@harnessio/react-rmg-service-client 0.0.2 → 0.0.3

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 (27) hide show
  1. package/dist/rmg-service/src/services/hooks/useDeleteReleaseGroupMutation.d.ts +2 -2
  2. package/dist/rmg-service/src/services/hooks/useGetReleaseGroupQuery.d.ts +2 -2
  3. package/dist/rmg-service/src/services/hooks/usePostReleaseGroupMutation.d.ts +2 -2
  4. package/dist/rmg-service/src/services/hooks/usePostReleaseSummaryMutation.d.ts +25 -0
  5. package/dist/rmg-service/src/services/hooks/usePostReleaseSummaryMutation.js +14 -0
  6. package/dist/rmg-service/src/services/hooks/usePutReleaseGroupMutation.d.ts +2 -2
  7. package/dist/rmg-service/src/services/index.d.ts +11 -0
  8. package/dist/rmg-service/src/services/index.js +1 -0
  9. package/dist/rmg-service/src/services/requestBodies/ReleaseSummaryRequestRequestBody.d.ts +12 -0
  10. package/dist/rmg-service/src/services/requestBodies/ReleaseSummaryRequestRequestBody.js +4 -0
  11. package/dist/rmg-service/src/services/responses/ReleaseSummaryResponseResponse.d.ts +2 -0
  12. package/dist/rmg-service/src/services/responses/ReleaseSummaryResponseResponse.js +1 -0
  13. package/dist/rmg-service/src/services/schemas/ReleaseCadence.d.ts +24 -0
  14. package/dist/rmg-service/src/services/schemas/ReleaseCadence.js +1 -0
  15. package/dist/rmg-service/src/services/schemas/ReleaseComponent.d.ts +22 -0
  16. package/dist/rmg-service/src/services/schemas/ReleaseComponent.js +4 -0
  17. package/dist/rmg-service/src/services/schemas/ReleaseEntity.d.ts +46 -0
  18. package/dist/rmg-service/src/services/schemas/ReleaseEntity.js +4 -0
  19. package/dist/rmg-service/src/services/schemas/ReleaseFrequency.d.ts +4 -0
  20. package/dist/rmg-service/src/services/schemas/ReleaseFrequency.js +4 -0
  21. package/dist/rmg-service/src/services/schemas/ReleaseGroupYaml.d.ts +34 -0
  22. package/dist/rmg-service/src/services/schemas/ReleaseGroupYaml.js +1 -0
  23. package/dist/rmg-service/src/services/schemas/ReleaseType.d.ts +4 -0
  24. package/dist/rmg-service/src/services/schemas/ReleaseType.js +4 -0
  25. package/dist/rmg-service/src/services/schemas/RepeatUnit.d.ts +4 -0
  26. package/dist/rmg-service/src/services/schemas/RepeatUnit.js +4 -0
  27. package/package.json +1 -1
@@ -7,10 +7,10 @@ export interface DeleteReleaseGroupMutationPathParams {
7
7
  releaseGroupId: string;
8
8
  }
9
9
  export interface DeleteReleaseGroupMutationQueryParams {
10
- OrgParam?: string;
10
+ orgIdentifier?: string;
11
11
  }
12
12
  export interface DeleteReleaseGroupMutationHeaderParams {
13
- AccountParam: string;
13
+ 'Harness-Account': string;
14
14
  }
15
15
  export type DeleteReleaseGroupOkResponse = ResponseWithPagination<DeleteReleaseGroupResponseResponse>;
16
16
  export type DeleteReleaseGroupErrorResponse = ErrorResponseResponse;
@@ -7,10 +7,10 @@ export interface GetReleaseGroupQueryPathParams {
7
7
  releaseGroupId: string;
8
8
  }
9
9
  export interface GetReleaseGroupQueryQueryParams {
10
- OrgParam?: string;
10
+ orgIdentifier?: string;
11
11
  }
12
12
  export interface GetReleaseGroupQueryHeaderParams {
13
- AccountParam: string;
13
+ 'Harness-Account': string;
14
14
  }
15
15
  export type GetReleaseGroupOkResponse = ResponseWithPagination<GetReleaseGroupResponseResponse>;
16
16
  export type GetReleaseGroupErrorResponse = ErrorResponseResponse;
@@ -5,10 +5,10 @@ import type { CreateReleaseGroupRequestRequestBody } from '../requestBodies/Crea
5
5
  import type { ResponseWithPagination } from '../helpers';
6
6
  import { FetcherOptions } from '../../../../fetcher/index.js';
7
7
  export interface PostReleaseGroupMutationQueryParams {
8
- OrgParam?: string;
8
+ orgIdentifier?: string;
9
9
  }
10
10
  export interface PostReleaseGroupMutationHeaderParams {
11
- AccountParam: string;
11
+ 'Harness-Account': string;
12
12
  }
13
13
  export type PostReleaseGroupRequestBody = CreateReleaseGroupRequestRequestBody;
14
14
  export type PostReleaseGroupOkResponse = ResponseWithPagination<CreateReleaseGroupResponseResponse>;
@@ -0,0 +1,25 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ReleaseSummaryResponseResponse } from '../responses/ReleaseSummaryResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ReleaseSummaryRequestRequestBody } from '../requestBodies/ReleaseSummaryRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface PostReleaseSummaryMutationQueryParams {
8
+ orgIdentifier?: string;
9
+ searchTerm?: string;
10
+ }
11
+ export interface PostReleaseSummaryMutationHeaderParams {
12
+ 'Harness-Account': string;
13
+ }
14
+ export type PostReleaseSummaryRequestBody = ReleaseSummaryRequestRequestBody;
15
+ export type PostReleaseSummaryOkResponse = ResponseWithPagination<ReleaseSummaryResponseResponse>;
16
+ export type PostReleaseSummaryErrorResponse = ErrorResponseResponse;
17
+ export interface PostReleaseSummaryProps extends Omit<FetcherOptions<PostReleaseSummaryMutationQueryParams, PostReleaseSummaryRequestBody, PostReleaseSummaryMutationHeaderParams>, 'url'> {
18
+ queryParams: PostReleaseSummaryMutationQueryParams;
19
+ body: PostReleaseSummaryRequestBody;
20
+ }
21
+ export declare function postReleaseSummary(props: PostReleaseSummaryProps): Promise<PostReleaseSummaryOkResponse>;
22
+ /**
23
+ * Fetch a list of releases based on the specified time ranges, optional filters, and search query.
24
+ */
25
+ export declare function usePostReleaseSummaryMutation(options?: Omit<UseMutationOptions<PostReleaseSummaryOkResponse, PostReleaseSummaryErrorResponse, PostReleaseSummaryProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PostReleaseSummaryOkResponse, import("..").Error, PostReleaseSummaryProps, 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 postReleaseSummary(props) {
7
+ return fetcher(Object.assign({ url: `/release/summary`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Fetch a list of releases based on the specified time ranges, optional filters, and search query.
11
+ */
12
+ export function usePostReleaseSummaryMutation(options) {
13
+ return useMutation((mutateProps) => postReleaseSummary(mutateProps), options);
14
+ }
@@ -8,10 +8,10 @@ export interface PutReleaseGroupMutationPathParams {
8
8
  releaseGroupId: string;
9
9
  }
10
10
  export interface PutReleaseGroupMutationQueryParams {
11
- OrgParam?: string;
11
+ orgIdentifier?: string;
12
12
  }
13
13
  export interface PutReleaseGroupMutationHeaderParams {
14
- AccountParam: string;
14
+ 'Harness-Account': string;
15
15
  }
16
16
  export type PutReleaseGroupRequestBody = UpdateReleaseGroupRequestRequestBody;
17
17
  export type PutReleaseGroupOkResponse = ResponseWithPagination<UpdateReleaseGroupResponseResponse>;
@@ -5,14 +5,25 @@ export type { GetReleaseGroupErrorResponse, GetReleaseGroupOkResponse, GetReleas
5
5
  export { getReleaseGroup, useGetReleaseGroupQuery } from './hooks/useGetReleaseGroupQuery';
6
6
  export type { PostReleaseGroupErrorResponse, PostReleaseGroupMutationQueryParams, PostReleaseGroupOkResponse, PostReleaseGroupProps, PostReleaseGroupRequestBody, } from './hooks/usePostReleaseGroupMutation';
7
7
  export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
8
+ export type { PostReleaseSummaryErrorResponse, PostReleaseSummaryMutationQueryParams, PostReleaseSummaryOkResponse, PostReleaseSummaryProps, PostReleaseSummaryRequestBody, } from './hooks/usePostReleaseSummaryMutation';
9
+ export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
8
10
  export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, PutReleaseGroupMutationQueryParams, PutReleaseGroupOkResponse, PutReleaseGroupProps, PutReleaseGroupRequestBody, } from './hooks/usePutReleaseGroupMutation';
9
11
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
10
12
  export type { CreateReleaseGroupRequestRequestBody } from './requestBodies/CreateReleaseGroupRequestRequestBody';
13
+ export type { ReleaseSummaryRequestRequestBody } from './requestBodies/ReleaseSummaryRequestRequestBody';
11
14
  export type { UpdateReleaseGroupRequestRequestBody } from './requestBodies/UpdateReleaseGroupRequestRequestBody';
12
15
  export type { CreateReleaseGroupResponseResponse } from './responses/CreateReleaseGroupResponseResponse';
13
16
  export type { DeleteReleaseGroupResponseResponse } from './responses/DeleteReleaseGroupResponseResponse';
14
17
  export type { ErrorResponseResponse } from './responses/ErrorResponseResponse';
15
18
  export type { GetReleaseGroupResponseResponse } from './responses/GetReleaseGroupResponseResponse';
19
+ export type { ReleaseSummaryResponseResponse } from './responses/ReleaseSummaryResponseResponse';
16
20
  export type { UpdateReleaseGroupResponseResponse } from './responses/UpdateReleaseGroupResponseResponse';
17
21
  export type { Error } from './schemas/Error';
18
22
  export type { GetReleaseGroupResponse } from './schemas/GetReleaseGroupResponse';
23
+ export type { ReleaseCadence } from './schemas/ReleaseCadence';
24
+ export type { ReleaseComponent } from './schemas/ReleaseComponent';
25
+ export type { ReleaseEntity } from './schemas/ReleaseEntity';
26
+ export type { ReleaseFrequency } from './schemas/ReleaseFrequency';
27
+ export type { ReleaseGroupYaml } from './schemas/ReleaseGroupYaml';
28
+ export type { ReleaseType } from './schemas/ReleaseType';
29
+ export type { RepeatUnit } from './schemas/RepeatUnit';
@@ -1,4 +1,5 @@
1
1
  export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
2
2
  export { getReleaseGroup, useGetReleaseGroupQuery } from './hooks/useGetReleaseGroupQuery';
3
3
  export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
4
+ export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
4
5
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
@@ -0,0 +1,12 @@
1
+ export type ReleaseSummaryRequestRequestBody = Array<{
2
+ /**
3
+ * End timestamp in milliseconds
4
+ * @example 1700600000000
5
+ */
6
+ endTime: number;
7
+ /**
8
+ * Start timestamp in milliseconds
9
+ * @example 1700000000000
10
+ */
11
+ startTime: number;
12
+ }>;
@@ -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,2 @@
1
+ import type { ReleaseEntity } from '../schemas/ReleaseEntity';
2
+ export type ReleaseSummaryResponseResponse = ReleaseEntity[];
@@ -0,0 +1,24 @@
1
+ import type { ReleaseFrequency } from '../schemas/ReleaseFrequency';
2
+ import type { RepeatUnit } from '../schemas/RepeatUnit';
3
+ export interface ReleaseCadence {
4
+ /**
5
+ * End date of the release cadence (YYYY-MM-DD).
6
+ * @format date
7
+ */
8
+ endDate?: string;
9
+ frequency: ReleaseFrequency;
10
+ /**
11
+ * Number of units between releases.
12
+ */
13
+ repeatInterval: number;
14
+ repeatUnit: RepeatUnit;
15
+ /**
16
+ * Start date of the release cadence (YYYY-MM-DD).
17
+ * @format date
18
+ */
19
+ startDate: string;
20
+ /**
21
+ * Timezone for the release cadence.
22
+ */
23
+ timezone: string;
24
+ }
@@ -0,0 +1,22 @@
1
+ export interface ReleaseComponent {
2
+ /**
3
+ * List of environment identifiers.
4
+ */
5
+ environments?: string[];
6
+ /**
7
+ * Identifier for the organization.
8
+ */
9
+ orgIdentifier: string;
10
+ /**
11
+ * List of pipeline identifiers.
12
+ */
13
+ pipelines?: string[];
14
+ /**
15
+ * Identifier for the project.
16
+ */
17
+ projectIdentifier: string;
18
+ /**
19
+ * List of service identifiers.
20
+ */
21
+ services?: string[];
22
+ }
@@ -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,46 @@
1
+ export interface ReleaseEntity {
2
+ /**
3
+ * Actual end timestamp in milliseconds
4
+ */
5
+ actualEndTs?: number;
6
+ /**
7
+ * Actual start timestamp in milliseconds
8
+ */
9
+ actualStartTs?: number;
10
+ /**
11
+ * Hex color code representing the release
12
+ */
13
+ color: string;
14
+ /**
15
+ * Expected end timestamp in milliseconds
16
+ */
17
+ expectedEndTs: number;
18
+ /**
19
+ * Expected start timestamp in milliseconds
20
+ */
21
+ expectedStartTs: number;
22
+ /**
23
+ * Unique identifier for the release
24
+ */
25
+ id: string;
26
+ /**
27
+ * Identifier for the release
28
+ */
29
+ identifier: string;
30
+ /**
31
+ * Name of the release
32
+ */
33
+ name: string;
34
+ /**
35
+ * Identifier for the release group
36
+ */
37
+ releaseGroupId: string;
38
+ /**
39
+ * Current status of the release
40
+ */
41
+ status: 'Failed' | 'Paused' | 'Running' | 'Scheduled' | 'Success';
42
+ /**
43
+ * Version of the release
44
+ */
45
+ version: string;
46
+ }
@@ -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,4 @@
1
+ /**
2
+ * Frequency of the release cadence.
3
+ */
4
+ export type ReleaseFrequency = 'Custom' | 'Daily' | 'Monthly' | 'Weekly';
@@ -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,34 @@
1
+ import type { ReleaseCadence } from '../schemas/ReleaseCadence';
2
+ import type { ReleaseComponent } from '../schemas/ReleaseComponent';
3
+ import type { ReleaseType } from '../schemas/ReleaseType';
4
+ export interface ReleaseGroupYaml {
5
+ cadence: ReleaseCadence;
6
+ /**
7
+ * Colour code for the release group (e.g.,
8
+ */
9
+ colour?: string;
10
+ components: ReleaseComponent[];
11
+ /**
12
+ * Description of the release group.
13
+ */
14
+ description?: string;
15
+ /**
16
+ * Unique identifier for the release group.
17
+ */
18
+ identifier: string;
19
+ /**
20
+ * Name of the release group.
21
+ */
22
+ name: string;
23
+ releaseType: ReleaseType;
24
+ /**
25
+ * Release version for the group.
26
+ */
27
+ releaseVersion: string;
28
+ /**
29
+ * Key-value pairs associated with the release group.
30
+ */
31
+ tags?: {
32
+ [key: string]: string;
33
+ };
34
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Type of release.
3
+ */
4
+ export type ReleaseType = 'Beta' | 'Hotfix' | 'System';
@@ -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,4 @@
1
+ /**
2
+ * Unit of time used for repeating releases.
3
+ */
4
+ export type RepeatUnit = 'Days' | 'Months' | 'Weeks';
@@ -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.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",