@harnessio/react-rmg-service-client 0.91.0 → 0.92.1-beta.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 (20) hide show
  1. package/dist/rmg-service/src/services/hooks/useListPendingApprovalsQuery.d.ts +34 -0
  2. package/dist/rmg-service/src/services/hooks/useListPendingApprovalsQuery.js +14 -0
  3. package/dist/rmg-service/src/services/hooks/useListPendingTasksQuery.d.ts +34 -0
  4. package/dist/rmg-service/src/services/hooks/useListPendingTasksQuery.js +14 -0
  5. package/dist/rmg-service/src/services/index.d.ts +10 -0
  6. package/dist/rmg-service/src/services/index.js +2 -0
  7. package/dist/rmg-service/src/services/schemas/ArtifactTrackerSettings.d.ts +4 -0
  8. package/dist/rmg-service/src/services/schemas/PendingApproval.d.ts +69 -0
  9. package/dist/rmg-service/src/services/schemas/PendingApproval.js +1 -0
  10. package/dist/rmg-service/src/services/schemas/PendingApprovalExecutionContext.d.ts +60 -0
  11. package/dist/rmg-service/src/services/schemas/PendingApprovalExecutionContext.js +4 -0
  12. package/dist/rmg-service/src/services/schemas/PendingApprovalList.d.ts +23 -0
  13. package/dist/rmg-service/src/services/schemas/PendingApprovalList.js +1 -0
  14. package/dist/rmg-service/src/services/schemas/PendingTask.d.ts +42 -0
  15. package/dist/rmg-service/src/services/schemas/PendingTask.js +1 -0
  16. package/dist/rmg-service/src/services/schemas/PendingTaskExecutionContext.d.ts +43 -0
  17. package/dist/rmg-service/src/services/schemas/PendingTaskExecutionContext.js +4 -0
  18. package/dist/rmg-service/src/services/schemas/PendingTaskList.d.ts +23 -0
  19. package/dist/rmg-service/src/services/schemas/PendingTaskList.js +1 -0
  20. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { PendingApprovalList } from '../schemas/PendingApprovalList';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ListPendingApprovalsQueryQueryParams {
7
+ orgIdentifier?: string;
8
+ projectIdentifier?: string;
9
+ myApprovals?: boolean;
10
+ pendingOnMe?: boolean;
11
+ requestedBy?: string;
12
+ pendingOnUserId?: string;
13
+ pendingOnOthers?: boolean;
14
+ nextCursor?: string;
15
+ previousCursor?: string;
16
+ sort?: string;
17
+ /**
18
+ * @default 20
19
+ */
20
+ size?: number;
21
+ }
22
+ export interface ListPendingApprovalsQueryHeaderParams {
23
+ 'Harness-Account': string;
24
+ }
25
+ export type ListPendingApprovalsOkResponse = ResponseWithPagination<PendingApprovalList>;
26
+ export type ListPendingApprovalsErrorResponse = ErrorResponseResponse;
27
+ export interface ListPendingApprovalsProps extends Omit<FetcherOptions<ListPendingApprovalsQueryQueryParams, unknown, ListPendingApprovalsQueryHeaderParams>, 'url'> {
28
+ queryParams: ListPendingApprovalsQueryQueryParams;
29
+ }
30
+ export declare function listPendingApprovals(props: ListPendingApprovalsProps): Promise<ListPendingApprovalsOkResponse>;
31
+ /**
32
+ * Collects the pipeline plan execution IDs of every pipeline activity in the given scope that is waiting for a user action, and returns the approval instances currently pending on them. Scope matching is exact: with no orgIdentifier/projectIdentifier only account-level activities are considered. Results are cursor-paginated; pass the lastSeenId and lastSeenCreatedAt from the previous response to fetch the next page.
33
+ */
34
+ export declare function useListPendingApprovalsQuery(props: ListPendingApprovalsProps, options?: Omit<UseQueryOptions<ListPendingApprovalsOkResponse, ListPendingApprovalsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListPendingApprovalsOkResponse, 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 listPendingApprovals(props) {
7
+ return fetcher(Object.assign({ url: `/approvals/pending`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Collects the pipeline plan execution IDs of every pipeline activity in the given scope that is waiting for a user action, and returns the approval instances currently pending on them. Scope matching is exact: with no orgIdentifier/projectIdentifier only account-level activities are considered. Results are cursor-paginated; pass the lastSeenId and lastSeenCreatedAt from the previous response to fetch the next page.
11
+ */
12
+ export function useListPendingApprovalsQuery(props, options) {
13
+ return useQuery(['listPendingApprovals', props.queryParams], ({ signal }) => listPendingApprovals(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,34 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { PendingTaskList } from '../schemas/PendingTaskList';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ListPendingTasksQueryQueryParams {
7
+ orgIdentifier?: string;
8
+ projectIdentifier?: string;
9
+ myTasks?: boolean;
10
+ pendingOnMe?: boolean;
11
+ requestedBy?: string;
12
+ pendingOnUserId?: string;
13
+ pendingOnOthers?: boolean;
14
+ nextCursor?: string;
15
+ previousCursor?: string;
16
+ sort?: string;
17
+ /**
18
+ * @default 20
19
+ */
20
+ size?: number;
21
+ }
22
+ export interface ListPendingTasksQueryHeaderParams {
23
+ 'Harness-Account': string;
24
+ }
25
+ export type ListPendingTasksOkResponse = ResponseWithPagination<PendingTaskList>;
26
+ export type ListPendingTasksErrorResponse = ErrorResponseResponse;
27
+ export interface ListPendingTasksProps extends Omit<FetcherOptions<ListPendingTasksQueryQueryParams, unknown, ListPendingTasksQueryHeaderParams>, 'url'> {
28
+ queryParams: ListPendingTasksQueryQueryParams;
29
+ }
30
+ export declare function listPendingTasks(props: ListPendingTasksProps): Promise<ListPendingTasksOkResponse>;
31
+ /**
32
+ * Returns manual activity tasks that are in a pending state (activity status RUNNING, ON_HOLD, or OUTPUT_WAITING) within the given scope. When myTasks is true, only tasks assigned to the calling user (via user_reference_id or user_groups membership) are returned.
33
+ */
34
+ export declare function useListPendingTasksQuery(props: ListPendingTasksProps, options?: Omit<UseQueryOptions<ListPendingTasksOkResponse, ListPendingTasksErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListPendingTasksOkResponse, 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 listPendingTasks(props) {
7
+ return fetcher(Object.assign({ url: `/tasks/pending`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns manual activity tasks that are in a pending state (activity status RUNNING, ON_HOLD, or OUTPUT_WAITING) within the given scope. When myTasks is true, only tasks assigned to the calling user (via user_reference_id or user_groups membership) are returned.
11
+ */
12
+ export function useListPendingTasksQuery(props, options) {
13
+ return useQuery(['listPendingTasks', props.queryParams], ({ signal }) => listPendingTasks(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -157,6 +157,10 @@ export type { ListChangesetsErrorResponse, ListChangesetsOkResponse, ListChanges
157
157
  export { listChangesets, useListChangesetsQuery } from './hooks/useListChangesetsQuery';
158
158
  export type { ListIntegrationExecutionsErrorResponse, ListIntegrationExecutionsOkResponse, ListIntegrationExecutionsProps, ListIntegrationExecutionsQueryQueryParams, } from './hooks/useListIntegrationExecutionsQuery';
159
159
  export { listIntegrationExecutions, useListIntegrationExecutionsQuery, } from './hooks/useListIntegrationExecutionsQuery';
160
+ export type { ListPendingApprovalsErrorResponse, ListPendingApprovalsOkResponse, ListPendingApprovalsProps, ListPendingApprovalsQueryQueryParams, } from './hooks/useListPendingApprovalsQuery';
161
+ export { listPendingApprovals, useListPendingApprovalsQuery, } from './hooks/useListPendingApprovalsQuery';
162
+ export type { ListPendingTasksErrorResponse, ListPendingTasksOkResponse, ListPendingTasksProps, ListPendingTasksQueryQueryParams, } from './hooks/useListPendingTasksQuery';
163
+ export { listPendingTasks, useListPendingTasksQuery } from './hooks/useListPendingTasksQuery';
160
164
  export type { MoveOrchestrationActivityToGitErrorResponse, MoveOrchestrationActivityToGitMutationPathParams, MoveOrchestrationActivityToGitMutationQueryParams, MoveOrchestrationActivityToGitOkResponse, MoveOrchestrationActivityToGitProps, MoveOrchestrationActivityToGitRequestBody, } from './hooks/useMoveOrchestrationActivityToGitMutation';
161
165
  export { moveOrchestrationActivityToGit, useMoveOrchestrationActivityToGitMutation, } from './hooks/useMoveOrchestrationActivityToGitMutation';
162
166
  export type { MoveOrchestrationProcessInputToGitErrorResponse, MoveOrchestrationProcessInputToGitMutationPathParams, MoveOrchestrationProcessInputToGitMutationQueryParams, MoveOrchestrationProcessInputToGitOkResponse, MoveOrchestrationProcessInputToGitProps, MoveOrchestrationProcessInputToGitRequestBody, } from './hooks/useMoveOrchestrationProcessInputToGitMutation';
@@ -482,6 +486,12 @@ export type { OutputDataType } from './schemas/OutputDataType';
482
486
  export type { OutputVariable } from './schemas/OutputVariable';
483
487
  export type { Pageable } from './schemas/Pageable';
484
488
  export type { PageableSort } from './schemas/PageableSort';
489
+ export type { PendingApproval } from './schemas/PendingApproval';
490
+ export type { PendingApprovalExecutionContext } from './schemas/PendingApprovalExecutionContext';
491
+ export type { PendingApprovalList } from './schemas/PendingApprovalList';
492
+ export type { PendingTask } from './schemas/PendingTask';
493
+ export type { PendingTaskExecutionContext } from './schemas/PendingTaskExecutionContext';
494
+ export type { PendingTaskList } from './schemas/PendingTaskList';
485
495
  export type { PhaseActionRequest } from './schemas/PhaseActionRequest';
486
496
  export type { PhaseActionResponse } from './schemas/PhaseActionResponse';
487
497
  export type { PhaseArtifactUpdateDto } from './schemas/PhaseArtifactUpdateDto';
@@ -77,6 +77,8 @@ export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQu
77
77
  export { listChangesetCommits, useListChangesetCommitsQuery, } from './hooks/useListChangesetCommitsQuery';
78
78
  export { listChangesets, useListChangesetsQuery } from './hooks/useListChangesetsQuery';
79
79
  export { listIntegrationExecutions, useListIntegrationExecutionsQuery, } from './hooks/useListIntegrationExecutionsQuery';
80
+ export { listPendingApprovals, useListPendingApprovalsQuery, } from './hooks/useListPendingApprovalsQuery';
81
+ export { listPendingTasks, useListPendingTasksQuery } from './hooks/useListPendingTasksQuery';
80
82
  export { moveOrchestrationActivityToGit, useMoveOrchestrationActivityToGitMutation, } from './hooks/useMoveOrchestrationActivityToGitMutation';
81
83
  export { moveOrchestrationProcessInputToGit, useMoveOrchestrationProcessInputToGitMutation, } from './hooks/useMoveOrchestrationProcessInputToGitMutation';
82
84
  export { moveOrchestrationProcessToGit, useMoveOrchestrationProcessToGitMutation, } from './hooks/useMoveOrchestrationProcessToGitMutation';
@@ -1,5 +1,9 @@
1
1
  import type { GitProviderType } from '../schemas/GitProviderType';
2
2
  export interface ArtifactTrackerSettings {
3
+ /**
4
+ * Docker connector the changeset pipeline pulls its images through when neither defaultDockerConnectorRef nor a service mapping override is set.
5
+ */
6
+ builtInDefaultDockerConnectorRef: string;
3
7
  /**
4
8
  * @format int64
5
9
  */
@@ -0,0 +1,69 @@
1
+ import type { PendingApprovalExecutionContext } from '../schemas/PendingApprovalExecutionContext';
2
+ import type { TriggeredByDto } from '../schemas/TriggeredByDto';
3
+ /**
4
+ * A pipeline approval that is waiting, together with the RMG execution it belongs to
5
+ */
6
+ export interface PendingApproval {
7
+ /**
8
+ * Account the pipeline execution belongs to
9
+ */
10
+ accountIdentifier?: string;
11
+ /**
12
+ * Identifier of the approval instance in the pipeline service
13
+ */
14
+ approvalId: string;
15
+ approvalMessage?: string;
16
+ /**
17
+ * @format int64
18
+ */
19
+ createdAt?: number;
20
+ /**
21
+ * Epoch millis after which the approval expires
22
+ * @format int64
23
+ */
24
+ deadline?: number;
25
+ errorMessage?: string;
26
+ executionContext: PendingApprovalExecutionContext;
27
+ /**
28
+ * @format int64
29
+ */
30
+ lastModifiedAt?: number;
31
+ /**
32
+ * Node execution ID in the pipeline execution graph
33
+ */
34
+ nodeExecutionId?: string;
35
+ /**
36
+ * Organisation the pipeline execution belongs to
37
+ */
38
+ orgIdentifier?: string;
39
+ pipelineIdentifier?: string;
40
+ /**
41
+ * Pipeline plan execution the approval belongs to
42
+ */
43
+ planExecutionId: string;
44
+ /**
45
+ * Project the pipeline execution belongs to
46
+ */
47
+ projectIdentifier?: string;
48
+ /**
49
+ * Sequential run number of the pipeline execution
50
+ */
51
+ runSequence?: number;
52
+ /**
53
+ * Pipeline stage identifier containing the approval step
54
+ */
55
+ stageIdentifier?: string;
56
+ /**
57
+ * Approval instance status, e.g. WAITING
58
+ */
59
+ status: string;
60
+ /**
61
+ * Pipeline step identifier for the approval step
62
+ */
63
+ stepIdentifier?: string;
64
+ triggeredBy?: TriggeredByDto;
65
+ /**
66
+ * Approval type, e.g. HARNESS_APPROVAL, JIRA_APPROVAL
67
+ */
68
+ type: string;
69
+ }
@@ -0,0 +1,60 @@
1
+ export interface PendingApprovalExecutionContext {
2
+ /**
3
+ * Activity execution that is waiting for the approval
4
+ */
5
+ activityExecutionId: string;
6
+ /**
7
+ * Identifier (slug) of the activity definition
8
+ */
9
+ activityId?: string;
10
+ /**
11
+ * Name of the activity
12
+ */
13
+ activityName?: string;
14
+ orgId?: string;
15
+ /**
16
+ * Parent activity execution, present only for grouped activities
17
+ */
18
+ parentActivityExecutionId?: string;
19
+ /**
20
+ * Parent phase execution, present only for nested phases
21
+ */
22
+ parentPhaseExecutionId?: string;
23
+ /**
24
+ * Phase execution the waiting activity belongs to
25
+ */
26
+ phaseExecutionId: string;
27
+ /**
28
+ * Identifier (slug) of the phase definition
29
+ */
30
+ phaseId?: string;
31
+ /**
32
+ * Name of the phase
33
+ */
34
+ phaseName?: string;
35
+ /**
36
+ * Process execution the waiting activity belongs to
37
+ */
38
+ processExecutionId: string;
39
+ /**
40
+ * Present when the activity belongs to a directly-triggered process (no release)
41
+ */
42
+ processId?: string;
43
+ /**
44
+ * Name of the process definition
45
+ */
46
+ processName?: string;
47
+ projectId?: string;
48
+ /**
49
+ * Present when the activity belongs to a release
50
+ */
51
+ releaseId?: string;
52
+ /**
53
+ * Human-readable name of the release
54
+ */
55
+ releaseName?: string;
56
+ /**
57
+ * Version label of the release
58
+ */
59
+ releaseVersion?: string;
60
+ }
@@ -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,23 @@
1
+ import type { PendingApproval } from '../schemas/PendingApproval';
2
+ /**
3
+ * Cursor-paginated list of pending approvals
4
+ */
5
+ export interface PendingApprovalList {
6
+ content?: PendingApproval[];
7
+ /**
8
+ * Number of items in this page
9
+ */
10
+ currentSize?: number;
11
+ /**
12
+ * Whether additional pages are available
13
+ */
14
+ hasMore?: boolean;
15
+ /**
16
+ * Opaque forward cursor. Pass as nextCursor on the next request to continue pagination. Absent when hasMore is false.
17
+ */
18
+ nextCursor?: string;
19
+ /**
20
+ * Opaque cursor for the previous backward page. Pass as previousCursor on the next request to navigate backward. Absent when this is the first page.
21
+ */
22
+ prevCursor?: string;
23
+ }
@@ -0,0 +1,42 @@
1
+ import type { PendingTaskExecutionContext } from '../schemas/PendingTaskExecutionContext';
2
+ import type { FailureInfo } from '../schemas/FailureInfo';
3
+ import type { StringOrBool } from '../schemas/StringOrBool';
4
+ import type { ExecutionTaskStatus } from '../schemas/ExecutionTaskStatus';
5
+ import type { TriggeredByDto } from '../schemas/TriggeredByDto';
6
+ import type { StringOrStringArray } from '../schemas/StringOrStringArray';
7
+ export interface PendingTask {
8
+ /**
9
+ * Actual duration taken for the task (e.g., "7h")
10
+ */
11
+ actualDuration?: string;
12
+ /**
13
+ * @format int64
14
+ */
15
+ createdAt?: number;
16
+ description?: string;
17
+ executionContext: PendingTaskExecutionContext;
18
+ /**
19
+ * Expected duration in milliseconds
20
+ * @format int64
21
+ */
22
+ expectedDuration: number;
23
+ failureInfo?: FailureInfo;
24
+ identifier: string;
25
+ /**
26
+ * @format int64
27
+ */
28
+ lastUpdatedAt?: number;
29
+ name: string;
30
+ required: StringOrBool;
31
+ status: ExecutionTaskStatus;
32
+ /**
33
+ * UUID of the task execution record
34
+ */
35
+ taskExecutionId?: string;
36
+ triggeredBy?: TriggeredByDto;
37
+ userGroups: StringOrStringArray;
38
+ /**
39
+ * Identifier of the user directly assigned to this task
40
+ */
41
+ userReferenceId?: string;
42
+ }
@@ -0,0 +1,43 @@
1
+ export interface PendingTaskExecutionContext {
2
+ activityExecutionId: string;
3
+ /**
4
+ * Identifier (slug) of the activity definition
5
+ */
6
+ activityId?: string;
7
+ /**
8
+ * Name of the activity the task belongs to
9
+ */
10
+ activityName?: string;
11
+ orgId?: string;
12
+ phaseExecutionId: string;
13
+ /**
14
+ * Identifier (slug) of the phase definition
15
+ */
16
+ phaseId?: string;
17
+ /**
18
+ * Name of the phase
19
+ */
20
+ phaseName?: string;
21
+ processExecutionId: string;
22
+ /**
23
+ * Present when the task belongs to a directly-triggered process (no release)
24
+ */
25
+ processId?: string;
26
+ /**
27
+ * Name of the process definition
28
+ */
29
+ processName?: string;
30
+ projectId?: string;
31
+ /**
32
+ * Present when the task belongs to a release
33
+ */
34
+ releaseId?: string;
35
+ /**
36
+ * Human-readable name of the release
37
+ */
38
+ releaseName?: string;
39
+ /**
40
+ * Version label of the release
41
+ */
42
+ releaseVersion?: string;
43
+ }
@@ -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,23 @@
1
+ import type { PendingTask } from '../schemas/PendingTask';
2
+ /**
3
+ * Cursor-paginated list of pending manual activity tasks
4
+ */
5
+ export interface PendingTaskList {
6
+ content?: PendingTask[];
7
+ /**
8
+ * Number of items in this page
9
+ */
10
+ currentSize?: number;
11
+ /**
12
+ * Whether additional pages are available
13
+ */
14
+ hasMore?: boolean;
15
+ /**
16
+ * Opaque forward cursor. Pass as nextCursor on the next request. Absent when hasMore is false.
17
+ */
18
+ nextCursor?: string;
19
+ /**
20
+ * Opaque backward cursor. Pass as previousCursor on the next request to navigate backward. Absent when this is the first page.
21
+ */
22
+ prevCursor?: string;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-rmg-service-client",
3
- "version": "0.91.0",
3
+ "version": "0.92.1-beta.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",