diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c6d94f..e54ea5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### Changed +- The client has been migrated to TypeScript. It now ships with bundled type + definitions (no separate `@types` package required) and exposes constants, + models and helpers via subpath imports (e.g. + `@reportportal/client-javascript/constants`). ### Added - `retry_of` property is now automatically included in the `startTestItem` request payload when `retry: true` and a previous attempt exists in the diff --git a/README.md b/README.md index 43e66e9..b800fb8 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,28 @@ rpClient.checkConnect().then(() => { }); ``` +## TypeScript + +Starting from version 5.6.0, the client has been migrated to TypeScript and ships with bundled type definitions. It works with both CommonJS and ES module projects: + +```typescript +import RPClient from '@reportportal/client-javascript'; + +const rpClient = new RPClient({ + apiKey: 'reportportalApiKey', + endpoint: 'https://your-instance.com:8080/api/v1', + launch: 'LAUNCH_NAME', + project: 'PROJECT_NAME', +}); +``` + +Constants, models and helpers are available via subpath imports: + +```typescript +import { RP_STATUSES } from '@reportportal/client-javascript/constants'; +import PublicReportingAPI from '@reportportal/client-javascript/publicReportingAPI'; +``` + ## Configuration When creating a client instance, you need to specify the following options. diff --git a/version_fragment b/version_fragment index 9eb7b90..acb503f 100644 --- a/version_fragment +++ b/version_fragment @@ -1 +1 @@ -patch +minor