Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion version_fragment
Original file line number Diff line number Diff line change
@@ -1 +1 @@
patch
minor