@harnessio/react-ccm-optimization-service-client
v0.3.1
Published
Harness CCM Optimization Service APIs integrated with react hooks
Keywords
Readme
React CCM Optimization Service Client
OpenAPI -> OA
TypeScript -> TS
OpenAPI + TypeScript -> OATS
This React API client stores Harness CCM Optimization Service API contracts generated from the OpenAPI spec using OATS CLI internally.
APIs use hooks from @tanstack/react-query.
Steps To Generate API Client build as dist folder
yarn buildFor NextGen UI / CCM UI adoption: CCMOptimizationServiceAPIClient should be initialized
Before using API Client, it must be initialized with required ClientCallbacks.
Example:
new CCMOptimizationServiceAPIClient({
getHeaders: () => ({
token: SessionToken.getToken(),
'Harness-Account': accountId,
}),
});Versioning
Once development phase is completed, this repo will have changes and versioning driven by API spec only.
Do not manually edit files under src/services/ — update openapi.yaml and run yarn generate.
License
MIT. Copyright(c) Harness Inc
