Skip to content

Commit

Permalink
Release JS package 3.2.0 (#270)
Browse files Browse the repository at this point in the history
* fix getRecordings method

* add spec for getRecordings

* remove url from the Recording interface

* generate versions
  • Loading branch information
Edoardo Gallo authored Sep 9, 2021
1 parent 5b4e57d commit e196102
Show file tree
Hide file tree
Showing 28 changed files with 101 additions and 84 deletions.
5 changes: 0 additions & 5 deletions .changeset/brave-toys-jog.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/clean-rockets-teach.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/friendly-zoos-eat.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/honest-waves-hug.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/loud-brooms-juggle.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/olive-pumpkins-deny.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rude-crabs-type.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ten-bees-develop.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/ten-candles-hang.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tender-lobsters-tie.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/unlucky-olives-compete.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wise-starfishes-cover.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/yellow-foxes-raise.md

This file was deleted.

14 changes: 14 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.2] - 2021-09-09

### Added

- [#261](https://github.com/signalwire/signalwire-js/pull/261) [`9dd7dbb`](https://github.com/signalwire/signalwire-js/commit/9dd7dbb890b92b5f69c3c9bb615083367d8113bb) - Add classes and typings to support the Recording APIs.

* [#273](https://github.com/signalwire/signalwire-js/pull/273) [`249facf`](https://github.com/signalwire/signalwire-js/commit/249facf92698be19f9567caea0283535b51a3ae7) - Added `member.talking.started`, `member.talking.ended` and deprecated `member.talking.start` and `member.talking.stop` for consistency.

### Fixed

- [#271](https://github.com/signalwire/signalwire-js/pull/271) [`e6233cc`](https://github.com/signalwire/signalwire-js/commit/e6233cc74fb3ad5fc3e042ac36f717be5e6988b8) - Bugfix on the internal EventEmitter where, in a specific case, the `.off()` method did not remove the listener. Improved test coverage.

- [#277](https://github.com/signalwire/signalwire-js/pull/277) [`5b4e57d`](https://github.com/signalwire/signalwire-js/commit/5b4e57d12fed829b15cf28a77ba0082f582e35f3) - Fix `validateEventsToSubscribe` method to check the prefixed-event.

## [3.1.1] - 2021-08-27

### Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Shared code for the SignalWire JS SDK",
"author": "SignalWire Team <[email protected]>",
"license": "MIT",
"version": "3.1.1",
"version": "3.1.2",
"main": "dist/index.node.js",
"module": "dist/index.esm.js",
"files": [
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/rooms/RoomSessionRecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export interface RoomSessionRecording {
id: string
roomSessionId: string
state: string
url: string
duration: string

pause(): Promise<void>
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/rooms/methods.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseRoomInterface } from '.'
import { VideoMember } from '../types'
import { VideoMember, VideoRecording } from '../types'
import { ExecuteExtendedOptions, RoomMethod } from '../utils/interfaces'

interface RoomMethodPropertyDescriptor<T> extends PropertyDescriptor {
Expand Down Expand Up @@ -102,10 +102,10 @@ export const showVideoMuted = createRoomMethod<BaseRPCResult, void>(
transformResolve: baseCodeTransform,
}
)
export const getRecordings = createRoomMethod<BaseRPCResult, void>(
export const getRecordings = createRoomMethod<{ recordings: VideoRecording[] }>(
'video.recording.list',
{
transformResolve: baseCodeTransform,
transformResolve: (payload) => ({ recordings: payload.recordings }),
}
)
export const startRecording: RoomMethodDescriptor<any> = {
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/types/videoRecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export type InternalVideoRecordingEventNames =
export interface VideoRecording {
id: string
state: 'recording' | 'paused' | 'completed'
url?: string
duration?: number
startedAt?: number
endedAt?: number
Expand Down
14 changes: 14 additions & 0 deletions packages/js/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.2.0] - 2021-09-09

### Added

- [#261](https://github.com/signalwire/signalwire-js/pull/261) [`9dd7dbb`](https://github.com/signalwire/signalwire-js/commit/9dd7dbb890b92b5f69c3c9bb615083367d8113bb) - Expose `startRecording()` method to recording a RoomSession. It returns a RoomSessionRecording object so it can be paused, resumed and stopped.

- [#273](https://github.com/signalwire/signalwire-js/pull/273) [`249facf`](https://github.com/signalwire/signalwire-js/commit/249facf92698be19f9567caea0283535b51a3ae7) - Added `member.talking.started`, `member.talking.ended` events and deprecated `member.talking.start` and `member.talking.stop` for consistency with other event names.

### Dependencies

- Updated dependencies [[`a0f2ac7`](https://github.com/signalwire/signalwire-js/commit/a0f2ac706667c8909e89e8b2bd9429db1d11dc9d), [`6f58367`](https://github.com/signalwire/signalwire-js/commit/6f5836793764d7153850be8de05792664c2859e2), [`f37333a`](https://github.com/signalwire/signalwire-js/commit/f37333a5464d7555822e70668a91221e6489de08), [`9dd7dbb`](https://github.com/signalwire/signalwire-js/commit/9dd7dbb890b92b5f69c3c9bb615083367d8113bb), [`e6233cc`](https://github.com/signalwire/signalwire-js/commit/e6233cc74fb3ad5fc3e042ac36f717be5e6988b8), [`9dd7dbb`](https://github.com/signalwire/signalwire-js/commit/9dd7dbb890b92b5f69c3c9bb615083367d8113bb), [`249facf`](https://github.com/signalwire/signalwire-js/commit/249facf92698be19f9567caea0283535b51a3ae7), [`5b4e57d`](https://github.com/signalwire/signalwire-js/commit/5b4e57d12fed829b15cf28a77ba0082f582e35f3), [`7380582`](https://github.com/signalwire/signalwire-js/commit/73805829683a8f4e2389dede2eaef25db4a5ffb7)]:
- @signalwire/core@3.1.2
- @signalwire/webrtc@3.1.2

## [3.1.1] - 2021-08-27

### Changed
Expand Down
6 changes: 3 additions & 3 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "SignalWire JS SDK",
"author": "SignalWire Team <[email protected]>",
"license": "MIT",
"version": "3.1.1",
"version": "3.2.0",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"unpkg": "dist/index.umd.js",
Expand Down Expand Up @@ -43,8 +43,8 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"@signalwire/core": "3.1.1",
"@signalwire/webrtc": "3.1.1"
"@signalwire/core": "3.1.2",
"@signalwire/webrtc": "3.1.2"
},
"types": "dist/js/src/index.d.ts"
}
34 changes: 34 additions & 0 deletions packages/js/src/Room.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,40 @@ describe('Room Object', () => {
expect(room.startRecording).toBeDefined()
})

describe('getRecordings', () => {
it('should return an array of recordings', async () => {
const { store, session, emitter } = configureFullStack()
const recordingList = [{ id: 'recordingOne' }, { id: 'recordingTwo' }]

session.execute = jest.fn().mockResolvedValue({
code: '200',
message: 'OK',
recordings: recordingList,
})

room = connect({
store,
Component: Room,
componentListeners: ROOM_COMPONENT_LISTENERS,
})({
store,
emitter,
})
// mock a room.subscribed event
room.onRoomSubscribed({
nodeId: 'node-id',
roomId: '6e83849b-5cc2-4fc6-80ed-448113c8a426',
roomSessionId: '8e03ac25-8622-411a-95fc-f897b34ac9e7',
memberId: 'member-id',
})

const result = await room.getRecordings()
expect(result).toStrictEqual({
recordings: recordingList,
})
})
})

describe('startRecording', () => {
it('should return an interactive object', async () => {
;(room.execute as jest.Mock).mockResolvedValueOnce({
Expand Down
1 change: 1 addition & 0 deletions packages/js/src/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const configureFullStack = () => {
const session = {
dispatch: console.log,
connect: jest.fn(),
execute: jest.fn(),
}
const emitter = new EventEmitter()
const store = configureStore({
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"@signalwire/core": "3.1.1",
"@signalwire/webrtc": "3.1.1"
"@signalwire/core": "3.1.2",
"@signalwire/webrtc": "3.1.2"
}
}
10 changes: 10 additions & 0 deletions packages/realtime-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## [Unreleased]

- [#276](https://github.com/signalwire/signalwire-js/pull/276) [`ca34859`](https://github.com/signalwire/signalwire-js/commit/ca34859f42fa7fd0abdf7842a1018896908ad45b) - Rename `createWebSocketClient` to `createClient`

* [#277](https://github.com/signalwire/signalwire-js/pull/277) [`5b4e57d`](https://github.com/signalwire/signalwire-js/commit/5b4e57d12fed829b15cf28a77ba0082f582e35f3) - Update event handlers for `room.updated` and `layout.changed` events and add new `member.talking.started`/`member.talking.ended` events.

- [#266](https://github.com/signalwire/signalwire-js/pull/266) [`f37333a`](https://github.com/signalwire/signalwire-js/commit/f37333a5464d7555822e70668a91221e6489de08) - Update instance type being passed to event handlers to better reflect purpose.

- Updated dependencies [[`a0f2ac7`](https://github.com/signalwire/signalwire-js/commit/a0f2ac706667c8909e89e8b2bd9429db1d11dc9d), [`6f58367`](https://github.com/signalwire/signalwire-js/commit/6f5836793764d7153850be8de05792664c2859e2), [`f37333a`](https://github.com/signalwire/signalwire-js/commit/f37333a5464d7555822e70668a91221e6489de08), [`e6233cc`](https://github.com/signalwire/signalwire-js/commit/e6233cc74fb3ad5fc3e042ac36f717be5e6988b8), [`9dd7dbb`](https://github.com/signalwire/signalwire-js/commit/9dd7dbb890b92b5f69c3c9bb615083367d8113bb), [`249facf`](https://github.com/signalwire/signalwire-js/commit/249facf92698be19f9567caea0283535b51a3ae7), [`5b4e57d`](https://github.com/signalwire/signalwire-js/commit/5b4e57d12fed829b15cf28a77ba0082f582e35f3)]:

- @signalwire/core@3.1.2

- [#246](https://github.com/signalwire/signalwire-js/pull/246) [`97dacbb`](https://github.com/signalwire/signalwire-js/commit/97dacbb3aaf9029a6781ac2356591f928ae40580) - Add typings for the RealTime video and room event listeners.

* [#222](https://github.com/signalwire/signalwire-js/pull/222) [`1ca7c2a`](https://github.com/signalwire/signalwire-js/commit/1ca7c2ac56d6d829192549ecb4e4fd29038ab0ce) - Initial implementation of the Real-Time Node.js SDK.
Expand Down
2 changes: 1 addition & 1 deletion packages/realtime-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"docs:watch": "npm run docs -- --watch"
},
"dependencies": {
"@signalwire/core": "3.1.1",
"@signalwire/core": "3.1.2",
"ws": "^7.4.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/web-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"docs:watch": "npm run docs -- --watch"
},
"dependencies": {
"@signalwire/core": "3.1.1",
"@signalwire/core": "3.1.2",
"node-abort-controller": "^2.0.0",
"node-fetch": "^2.6.1"
},
Expand Down
17 changes: 15 additions & 2 deletions packages/webrtc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,22 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.2] - 2021-09-09

### Added

- [#261](https://github.com/signalwire/signalwire-js/pull/261) [`9dd7dbb`](https://github.com/signalwire/signalwire-js/commit/9dd7dbb890b92b5f69c3c9bb615083367d8113bb) - Include all the `video.recording` events for the BaseConnection subscribe.

* [#257](https://github.com/signalwire/signalwire-js/pull/257) [`7380582`](https://github.com/signalwire/signalwire-js/commit/73805829683a8f4e2389dede2eaef25db4a5ffb7) - Added documentation for the exposed WebRTC methods.

### Dependencies

- Updated dependencies [[`a0f2ac7`](https://github.com/signalwire/signalwire-js/commit/a0f2ac706667c8909e89e8b2bd9429db1d11dc9d), [`6f58367`](https://github.com/signalwire/signalwire-js/commit/6f5836793764d7153850be8de05792664c2859e2), [`f37333a`](https://github.com/signalwire/signalwire-js/commit/f37333a5464d7555822e70668a91221e6489de08), [`e6233cc`](https://github.com/signalwire/signalwire-js/commit/e6233cc74fb3ad5fc3e042ac36f717be5e6988b8), [`9dd7dbb`](https://github.com/signalwire/signalwire-js/commit/9dd7dbb890b92b5f69c3c9bb615083367d8113bb), [`249facf`](https://github.com/signalwire/signalwire-js/commit/249facf92698be19f9567caea0283535b51a3ae7), [`5b4e57d`](https://github.com/signalwire/signalwire-js/commit/5b4e57d12fed829b15cf28a77ba0082f582e35f3)]:
- @signalwire/core@3.1.2

## [3.1.1] - 2021-08-27

### Patch Changes
### Fixed

- [#244](https://github.com/signalwire/signalwire-js/pull/244) [`c270247`](https://github.com/signalwire/signalwire-js/commit/c270247769c6ae2584f0372bbb1426c6c994732a) - Validate `targets` passed to the `createDeviceWatcher()` WebRTC helper method.

Expand All @@ -17,7 +30,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [3.1.0] - 2021-08-13

### Minor Changes
### Added

- [#236](https://github.com/signalwire/signalwire-js/pull/236) [`b967c89`](https://github.com/signalwire/signalwire-js/commit/b967c892d99ad7fa96ebc5a31a871bde1eecb0d0) - Apply `audio` and `video` constraints sent from the backend consuming the `mediaParams` event.

Expand Down
4 changes: 2 additions & 2 deletions packages/webrtc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "SignalWire WebRTC library",
"author": "SignalWire Team <[email protected]>",
"license": "MIT",
"version": "3.1.1",
"version": "3.1.2",
"main": "dist/cjs/webrtc/src/index.js",
"module": "dist/mjs/webrtc/src/index.js",
"files": [
Expand Down Expand Up @@ -39,7 +39,7 @@
"docs:watch": "npm run docs -- --watch"
},
"dependencies": {
"@signalwire/core": "3.1.1"
"@signalwire/core": "3.1.2"
},
"types": "dist/cjs/webrtc/src/index.d.ts"
}

0 comments on commit e196102

Please sign in to comment.