@harnessio/react-chaos-manager-client 1.76.1 → 1.78.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/chaos-manager/src/services/hooks/useGetOnboardingStatsV3Query.d.ts +26 -0
  2. package/dist/chaos-manager/src/services/hooks/useGetOnboardingStatsV3Query.js +14 -0
  3. package/dist/chaos-manager/src/services/index.d.ts +10 -0
  4. package/dist/chaos-manager/src/services/index.js +1 -0
  5. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageChaosStatsByType.d.ts +9 -0
  6. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageChaosStatsByType.js +4 -0
  7. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadRatioConfig.d.ts +14 -0
  8. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadRatioConfig.js +4 -0
  9. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadStats.d.ts +5 -0
  10. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadStats.js +4 -0
  11. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadStatsByType.d.ts +5 -0
  12. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadStatsByType.js +4 -0
  13. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageOverallServiceUsageStats.d.ts +15 -0
  14. package/dist/chaos-manager/src/services/schemas/ChaosserviceusagePeriodicStats.d.ts +22 -1
  15. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageServiceType.d.ts +1 -1
  16. package/dist/chaos-manager/src/services/schemas/ChaosserviceusageStatsByType.d.ts +1 -0
  17. package/dist/chaos-manager/src/services/schemas/OnboardingAvailableOnboardedCount.d.ts +4 -0
  18. package/dist/chaos-manager/src/services/schemas/OnboardingAvailableOnboardedCount.js +4 -0
  19. package/dist/chaos-manager/src/services/schemas/OnboardingOnboardedCount.d.ts +3 -0
  20. package/dist/chaos-manager/src/services/schemas/OnboardingOnboardedCount.js +4 -0
  21. package/dist/chaos-manager/src/services/schemas/OnboardingStats.d.ts +28 -0
  22. package/dist/chaos-manager/src/services/schemas/OnboardingStats.js +1 -0
  23. package/dist/chaos-manager/src/services/schemas/OnboardingStatsResponse.d.ts +5 -0
  24. package/dist/chaos-manager/src/services/schemas/OnboardingStatsResponse.js +1 -0
  25. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { OnboardingStatsResponse } from '../schemas/OnboardingStatsResponse';
3
+ import type { SharedError } from '../schemas/SharedError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface GetOnboardingStatsV3QueryQueryParams {
6
+ accountIdentifier: string;
7
+ correlationID?: string;
8
+ organizationIdentifier?: string;
9
+ parentUniqueId?: string;
10
+ projectIdentifier?: string;
11
+ useParentUniqueID?: boolean;
12
+ }
13
+ export type GetOnboardingStatsV3OkResponse = OnboardingStatsResponse;
14
+ export type GetOnboardingStatsV3ErrorResponse = SharedError;
15
+ export interface GetOnboardingStatsV3Props extends Omit<FetcherOptions<GetOnboardingStatsV3QueryQueryParams, unknown>, 'url'> {
16
+ queryParams: GetOnboardingStatsV3QueryQueryParams;
17
+ }
18
+ export interface GetOnboardingStatsV3ResponseContainer {
19
+ body: GetOnboardingStatsV3OkResponse;
20
+ headers: Headers;
21
+ }
22
+ export declare function getOnboardingStatsV3(props: GetOnboardingStatsV3Props): Promise<GetOnboardingStatsV3ResponseContainer>;
23
+ /**
24
+ * Returns the counts that drive the resilience testing onboarding screen: connected chaos infrastructures and discovery agents, infrastructures and deployment pipelines available to scan for risks against the ones already scanned, plus the chaos experiment and load test totals for the project
25
+ */
26
+ export declare function useGetOnboardingStatsV3Query(props: GetOnboardingStatsV3Props, options?: Omit<UseQueryOptions<GetOnboardingStatsV3ResponseContainer, GetOnboardingStatsV3ErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetOnboardingStatsV3ResponseContainer, SharedError>;
@@ -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 '../../../../custom-fetcher/index.js';
6
+ export function getOnboardingStatsV3(props) {
7
+ return fetcher(Object.assign({ url: `/v3/onboarding-stats`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns the counts that drive the resilience testing onboarding screen: connected chaos infrastructures and discovery agents, infrastructures and deployment pipelines available to scan for risks against the ones already scanned, plus the chaos experiment and load test totals for the project
11
+ */
12
+ export function useGetOnboardingStatsV3Query(props, options) {
13
+ return useQuery(['getOnboardingStatsV3', props.queryParams], ({ signal }) => getOnboardingStatsV3(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -246,6 +246,8 @@ export type { GetNoteErrorResponse, GetNoteOkResponse, GetNoteProps, GetNoteQuer
246
246
  export { getNote, useGetNoteQuery } from './hooks/useGetNoteQuery';
247
247
  export type { GetOnboardingExperimentsErrorResponse, GetOnboardingExperimentsOkResponse, GetOnboardingExperimentsProps, GetOnboardingExperimentsQueryPathParams, GetOnboardingExperimentsQueryQueryParams, } from './hooks/useGetOnboardingExperimentsQuery';
248
248
  export { getOnboardingExperiments, useGetOnboardingExperimentsQuery, } from './hooks/useGetOnboardingExperimentsQuery';
249
+ export type { GetOnboardingStatsV3ErrorResponse, GetOnboardingStatsV3OkResponse, GetOnboardingStatsV3Props, GetOnboardingStatsV3QueryQueryParams, } from './hooks/useGetOnboardingStatsV3Query';
250
+ export { getOnboardingStatsV3, useGetOnboardingStatsV3Query, } from './hooks/useGetOnboardingStatsV3Query';
249
251
  export type { GetOverallServiceUsageStatsErrorResponse, GetOverallServiceUsageStatsOkResponse, GetOverallServiceUsageStatsProps, GetOverallServiceUsageStatsQueryPathParams, GetOverallServiceUsageStatsQueryQueryParams, } from './hooks/useGetOverallServiceUsageStatsQuery';
250
252
  export { getOverallServiceUsageStats, useGetOverallServiceUsageStatsQuery, } from './hooks/useGetOverallServiceUsageStatsQuery';
251
253
  export type { GetProbeManifestErrorResponse, GetProbeManifestOkResponse, GetProbeManifestProps, GetProbeManifestQueryPathParams, GetProbeManifestQueryQueryParams, } from './hooks/useGetProbeManifestQuery';
@@ -731,7 +733,11 @@ export type { ChaosservicesListLoadTestsResponse } from './schemas/Chaosservices
731
733
  export type { ChaosservicesLoadTestSummaryResponse } from './schemas/ChaosservicesLoadTestSummaryResponse';
732
734
  export type { ChaosservicesServiceProbeAssociation } from './schemas/ChaosservicesServiceProbeAssociation';
733
735
  export type { ChaosservicesUpdateRequest } from './schemas/ChaosservicesUpdateRequest';
736
+ export type { ChaosserviceusageChaosStatsByType } from './schemas/ChaosserviceusageChaosStatsByType';
734
737
  export type { ChaosserviceusageInfrastructureType } from './schemas/ChaosserviceusageInfrastructureType';
738
+ export type { ChaosserviceusageLoadRatioConfig } from './schemas/ChaosserviceusageLoadRatioConfig';
739
+ export type { ChaosserviceusageLoadStats } from './schemas/ChaosserviceusageLoadStats';
740
+ export type { ChaosserviceusageLoadStatsByType } from './schemas/ChaosserviceusageLoadStatsByType';
735
741
  export type { ChaosserviceusageOverallServiceUsageStats } from './schemas/ChaosserviceusageOverallServiceUsageStats';
736
742
  export type { ChaosserviceusagePeriodicStats } from './schemas/ChaosserviceusagePeriodicStats';
737
743
  export type { ChaosserviceusageServiceData } from './schemas/ChaosserviceusageServiceData';
@@ -1133,6 +1139,10 @@ export type { NetworkmapListTargetServiceResponse } from './schemas/NetworkmapLi
1133
1139
  export type { NetworkmapRetryExperimentCreationRequest } from './schemas/NetworkmapRetryExperimentCreationRequest';
1134
1140
  export type { NetworkmapRetryExperimentCreationResponse } from './schemas/NetworkmapRetryExperimentCreationResponse';
1135
1141
  export type { NetworkmapTargetServiceDetails } from './schemas/NetworkmapTargetServiceDetails';
1142
+ export type { OnboardingAvailableOnboardedCount } from './schemas/OnboardingAvailableOnboardedCount';
1143
+ export type { OnboardingOnboardedCount } from './schemas/OnboardingOnboardedCount';
1144
+ export type { OnboardingStats } from './schemas/OnboardingStats';
1145
+ export type { OnboardingStatsResponse } from './schemas/OnboardingStatsResponse';
1136
1146
  export type { PipelineonboardingInfrastructureOnboardingMapping } from './schemas/PipelineonboardingInfrastructureOnboardingMapping';
1137
1147
  export type { PipelineonboardingInfrastructuresStatus } from './schemas/PipelineonboardingInfrastructuresStatus';
1138
1148
  export type { PipelineonboardingListPipelineOnboardingResponse } from './schemas/PipelineonboardingListPipelineOnboardingResponse';
@@ -122,6 +122,7 @@ export { getMachineChaosInfraDetails, useGetMachineChaosInfraDetailsQuery, } fro
122
122
  export { getMachineChaosInfraVersionDetails, useGetMachineChaosInfraVersionDetailsQuery, } from './hooks/useGetMachineChaosInfraVersionDetailsQuery';
123
123
  export { getNote, useGetNoteQuery } from './hooks/useGetNoteQuery';
124
124
  export { getOnboardingExperiments, useGetOnboardingExperimentsQuery, } from './hooks/useGetOnboardingExperimentsQuery';
125
+ export { getOnboardingStatsV3, useGetOnboardingStatsV3Query, } from './hooks/useGetOnboardingStatsV3Query';
125
126
  export { getOverallServiceUsageStats, useGetOverallServiceUsageStatsQuery, } from './hooks/useGetOverallServiceUsageStatsQuery';
126
127
  export { getProbeManifest, useGetProbeManifestQuery } from './hooks/useGetProbeManifestQuery';
127
128
  export { getProbe, useGetProbeQuery } from './hooks/useGetProbeQuery';
@@ -0,0 +1,9 @@
1
+ export interface ChaosserviceusageChaosStatsByType {
2
+ 'Cloud Resources'?: number;
3
+ 'Container Services'?: number;
4
+ Kubernetes?: number;
5
+ Linux?: number;
6
+ Others?: number;
7
+ Serverless?: number;
8
+ Windows?: number;
9
+ }
@@ -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,14 @@
1
+ export interface ChaosserviceusageLoadRatioConfig {
2
+ baseServiceWeight?: number;
3
+ categoricalWeights?: {
4
+ [key: string]: {
5
+ [key: string]: number;
6
+ };
7
+ };
8
+ metricThresholds?: {
9
+ [key: string]: number;
10
+ };
11
+ metricWeights?: {
12
+ [key: string]: number;
13
+ };
14
+ }
@@ -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,5 @@
1
+ export interface ChaosserviceusageLoadStats {
2
+ loadTestRuns?: number;
3
+ loadTests?: number;
4
+ serviceUsage?: number;
5
+ }
@@ -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,5 @@
1
+ export interface ChaosserviceusageLoadStatsByType {
2
+ Java?: number;
3
+ JavaScript?: number;
4
+ Python?: number;
5
+ }
@@ -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,7 +1,22 @@
1
1
  import type { ChaosserviceusageStatsByType } from '../schemas/ChaosserviceusageStatsByType';
2
+ import type { ChaosserviceusageLoadRatioConfig } from '../schemas/ChaosserviceusageLoadRatioConfig';
3
+ import type { ChaosserviceusageLoadStats } from '../schemas/ChaosserviceusageLoadStats';
2
4
  export interface ChaosserviceusageOverallServiceUsageStats {
3
5
  accountID?: string;
4
6
  licenseServiceMapping?: ChaosserviceusageStatsByType;
7
+ /**
8
+ * LoadRatioConfig is the complexity factor behind LoadStats.ServiceUsage.
9
+ * Nil when the account has no load ratio config yet.
10
+ */
11
+ loadRatioConfig?: ChaosserviceusageLoadRatioConfig;
12
+ /**
13
+ * LoadStats is the load testing share of TotalUsage plus its activity counts.
14
+ */
15
+ loadStats?: ChaosserviceusageLoadStats;
5
16
  serviceStats?: ChaosserviceusageStatsByType;
17
+ /**
18
+ * TotalUsage is the account's total license utilisation over the window,
19
+ * covering both chaos service usage and LoadStats.ServiceUsage.
20
+ */
6
21
  totalUsage?: number;
7
22
  }
@@ -1,8 +1,29 @@
1
+ import type { ChaosserviceusageChaosStatsByType } from '../schemas/ChaosserviceusageChaosStatsByType';
2
+ import type { ChaosserviceusageLoadStatsByType } from '../schemas/ChaosserviceusageLoadStatsByType';
1
3
  import type { ChaosserviceusageStatsByType } from '../schemas/ChaosserviceusageStatsByType';
2
4
  export interface ChaosserviceusagePeriodicStats {
3
- experimentStatsByType?: ChaosserviceusageStatsByType;
5
+ /**
6
+ * ExperimentStatsByType has no load category: load runs are counted by
7
+ * LoadExecutionsByType, broken down by language rather than infra type.
8
+ */
9
+ experimentStatsByType?: ChaosserviceusageChaosStatsByType;
10
+ loadExecutionsByType?: ChaosserviceusageLoadStatsByType;
11
+ /**
12
+ * LoadServicesStatsByType counts the services load tested in the period,
13
+ * grouped by scripting language. LoadExecutionsByType counts their load
14
+ * test runs the same way. The period's load license utilisation is not
15
+ * repeated here: it is ServiceStatsByType.Load.
16
+ */
17
+ loadServicesStatsByType?: ChaosserviceusageLoadStatsByType;
18
+ /**
19
+ * ServiceStatsByType.Load is the period's load license utilisation.
20
+ */
4
21
  serviceStatsByType?: ChaosserviceusageStatsByType;
5
22
  timestamp?: number;
23
+ /**
24
+ * TotalServicesConsumption is the period's full license utilisation: the
25
+ * sum of every ServiceStatsByType category, load included.
26
+ */
6
27
  totalConsumption?: number;
7
28
  totalExperimentRunsConsumption?: number;
8
29
  }
@@ -1 +1 @@
1
- export type ChaosserviceusageServiceType = 'CloudResources' | 'ContainerServices' | 'Kubernetes' | 'Linux' | 'Others' | 'Serverless' | 'Windows';
1
+ export type ChaosserviceusageServiceType = 'CloudResources' | 'ContainerServices' | 'Kubernetes' | 'Linux' | 'Load' | 'Others' | 'Serverless' | 'Windows';
@@ -3,6 +3,7 @@ export interface ChaosserviceusageStatsByType {
3
3
  'Container Services'?: number;
4
4
  Kubernetes?: number;
5
5
  Linux?: number;
6
+ Load?: number;
6
7
  Others?: number;
7
8
  Serverless?: number;
8
9
  Windows?: number;
@@ -0,0 +1,4 @@
1
+ export interface OnboardingAvailableOnboardedCount {
2
+ available?: number;
3
+ onboarded?: number;
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,3 @@
1
+ export interface OnboardingOnboardedCount {
2
+ onboarded?: number;
3
+ }
@@ -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,28 @@
1
+ import type { OnboardingOnboardedCount } from '../schemas/OnboardingOnboardedCount';
2
+ import type { OnboardingAvailableOnboardedCount } from '../schemas/OnboardingAvailableOnboardedCount';
3
+ export interface OnboardingStats {
4
+ /**
5
+ * ChaosExperiments is the number of chaos experiments in the project.
6
+ */
7
+ chaosExperiments?: OnboardingOnboardedCount;
8
+ /**
9
+ * InfrastructureScans compares the connected KUBERNETESV2 chaos
10
+ * infrastructures against the ones already covered by a discovery agent risk
11
+ * scan.
12
+ */
13
+ infrastructureScans?: OnboardingAvailableOnboardedCount;
14
+ /**
15
+ * Infrastructures compares the connected KUBERNETESV2 chaos infrastructures
16
+ * against the discovery agents registered for the project.
17
+ */
18
+ infrastructures?: OnboardingAvailableOnboardedCount;
19
+ /**
20
+ * LoadTests is the number of load tests in the project.
21
+ */
22
+ loadTests?: OnboardingOnboardedCount;
23
+ /**
24
+ * PipelineScans compares the Harness deployment pipelines in the project
25
+ * against the ones already covered by a risk scan.
26
+ */
27
+ pipelineScans?: OnboardingAvailableOnboardedCount;
28
+ }
@@ -0,0 +1,5 @@
1
+ import type { OnboardingStats } from '../schemas/OnboardingStats';
2
+ export interface OnboardingStatsResponse {
3
+ correlationID?: string;
4
+ data?: OnboardingStats;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-chaos-manager-client",
3
- "version": "1.76.1",
3
+ "version": "1.78.0",
4
4
  "description": "Harness React Chaos Manager Service Client - APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",