Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor tweak to docs #109

Merged
merged 6 commits into from
Sep 8, 2023
Merged
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
47 changes: 47 additions & 0 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Genesys Web Messaging Tester
- [ReorderedMessageDelayer](classes/ReorderedMessageDelayer.md)
- [SessionTranscriber](classes/SessionTranscriber.md)
- [TimeoutWaitingForResponseError](classes/TimeoutWaitingForResponseError.md)
- [WebMessageServerConnectionFixture](classes/WebMessageServerConnectionFixture.md)
- [WebMessageServerFixture](classes/WebMessageServerFixture.md)
- [WebMessengerGuestSession](classes/WebMessengerGuestSession.md)

### Interfaces
Expand All @@ -21,3 +23,48 @@ Genesys Web Messaging Tester
- [StructuredMessage](interfaces/StructuredMessage.md)
- [TranscribedMessage](interfaces/TranscribedMessage.md)
- [WebMessengerSession](interfaces/WebMessengerSession.md)

### Type Aliases

- [Response](README.md#response)

### Variables

- [webMessagePayloads](README.md#webmessagepayloads)

## Type Aliases

### Response

Ƭ **Response**<`T`\>: `SuccessResponse`<`T`\> \| `FailureResponse`

#### Type parameters

| Name |
| :------ |
| `T` |

#### Defined in

[packages/genesys-web-messaging-tester/src/genesys/Response.ts:19](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/Response.ts#L19)

## Variables

### webMessagePayloads

• `Const` **webMessagePayloads**: `Object`

Payloads taken from real interactions

#### Type declaration

| Name | Type |
| :------ | :------ |
| `inboundStructuredMessage` | (`text`: `string`, `date`: `Date`) => [`StructuredMessage`](interfaces/StructuredMessage.md) |
| `outboundDisconnectEventStructuredMessage` | (`date`: `Date`) => [`StructuredMessage`](interfaces/StructuredMessage.md) |
| `outboundTextStructuredMessage` | (`text`: `string`, `date`: `Date`) => [`StructuredMessage`](interfaces/StructuredMessage.md) |
| `sessionResponse` | () => [`SessionResponse`](interfaces/SessionResponse.md) |

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/webMessagePayloads.ts:6](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/webMessagePayloads.ts#L6)
25 changes: 20 additions & 5 deletions docs/api/classes/ReorderedMessageDelayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ timestamps.
### Accessors

- [delay](ReorderedMessageDelayer.md#delay)
- [unorderdMessageDetected](ReorderedMessageDelayer.md#unorderdmessagedetected)

### Methods

Expand Down Expand Up @@ -68,7 +69,7 @@ timestamps.

| Name | Type | Default value |
| :------ | :------ | :------ |
| `delayBeforeEmittingInMs` | `number` | `5000` |
| `delayBeforeEmittingInMs` | `number` | `1000` |
| `intervalInMs` | `number` | `1000` |
| `intervalSet` | (`callback`: (...`args`: `any`[]) => `void`, `ms?`: `number`, ...`args`: `any`[]) => `NodeJS.Timeout` | `setInterval` |
| `intervalClear` | (`intervalId`: `undefined` \| `string` \| `number` \| `Timeout`) => `void` | `clearInterval` |
Expand All @@ -79,7 +80,7 @@ EventEmitter.constructor

#### Defined in

[packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts:32](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts#L32)
[packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts:34](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts#L34)

## Properties

Expand Down Expand Up @@ -163,7 +164,21 @@ MessageDelayer.delay

#### Defined in

[packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts:137](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts#L137)
[packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts:142](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts#L142)

___

### unorderdMessageDetected

• `get` **unorderdMessageDetected**(): `boolean`

#### Returns

`boolean`

#### Defined in

[packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts:69](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts#L69)

## Methods

Expand All @@ -178,7 +193,7 @@ before releasing the oldest message.

| Name | Type |
| :------ | :------ |
| `message` | `Response`<`unknown`\> |
| `message` | [`Response`](../README.md#response)<`unknown`\> |
| `received` | `Date` |

#### Returns
Expand All @@ -191,7 +206,7 @@ before releasing the oldest message.

#### Defined in

[packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts:67](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts#L67)
[packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts:77](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/message-delayer/ReorderedMessageDelayer.ts#L77)

___

Expand Down
138 changes: 138 additions & 0 deletions docs/api/classes/WebMessageServerConnectionFixture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
[Genesys Web Messaging Tester](../README.md) / WebMessageServerConnectionFixture

# Class: WebMessageServerConnectionFixture

## Table of contents

### Constructors

- [constructor](WebMessageServerConnectionFixture.md#constructor)

### Methods

- [simulateInboundTextStructuredMessage](WebMessageServerConnectionFixture.md#simulateinboundtextstructuredmessage)
- [simulateOutboundDisconnectEventStructuredMessage](WebMessageServerConnectionFixture.md#simulateoutbounddisconnecteventstructuredmessage)
- [simulateOutboundTextStructuredMessage](WebMessageServerConnectionFixture.md#simulateoutboundtextstructuredmessage)
- [simulateSessionResponseMessage](WebMessageServerConnectionFixture.md#simulatesessionresponsemessage)
- [waitForConnectionToClose](WebMessageServerConnectionFixture.md#waitforconnectiontoclose)
- [waitForMessage](WebMessageServerConnectionFixture.md#waitformessage)

## Constructors

### constructor

• **new WebMessageServerConnectionFixture**(`ws`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `ws` | `WebSocket` |

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts:5](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts#L5)

## Methods

### simulateInboundTextStructuredMessage

▸ **simulateInboundTextStructuredMessage**(`text`, `date?`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `text` | `string` |
| `date` | `Date` |

#### Returns

`void`

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts:42](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts#L42)

___

### simulateOutboundDisconnectEventStructuredMessage

▸ **simulateOutboundDisconnectEventStructuredMessage**(`date?`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `date` | `Date` |

#### Returns

`void`

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts:37](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts#L37)

___

### simulateOutboundTextStructuredMessage

▸ **simulateOutboundTextStructuredMessage**(`text`, `date?`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `text` | `string` |
| `date` | `Date` |

#### Returns

`void`

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts:32](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts#L32)

___

### simulateSessionResponseMessage

▸ **simulateSessionResponseMessage**(): `void`

#### Returns

`void`

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts:27](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts#L27)

___

### waitForConnectionToClose

▸ **waitForConnectionToClose**(): `Promise`<`void`\>

#### Returns

`Promise`<`void`\>

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts:23](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts#L23)

___

### waitForMessage

▸ **waitForMessage**(): `Promise`<`any`\>

#### Returns

`Promise`<`any`\>

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts:7](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerConnectionFixture.ts#L7)
72 changes: 72 additions & 0 deletions docs/api/classes/WebMessageServerFixture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[Genesys Web Messaging Tester](../README.md) / WebMessageServerFixture

# Class: WebMessageServerFixture

## Table of contents

### Constructors

- [constructor](WebMessageServerFixture.md#constructor)

### Properties

- [port](WebMessageServerFixture.md#port)

### Methods

- [close](WebMessageServerFixture.md#close)
- [waitForConnection](WebMessageServerFixture.md#waitforconnection)

## Constructors

### constructor

• **new WebMessageServerFixture**(`port`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `port` | `number` |

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerFixture.ts:8](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerFixture.ts#L8)

## Properties

### port

• `Readonly` **port**: `number`

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerFixture.ts:8](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerFixture.ts#L8)

## Methods

### close

▸ **close**(): `void`

#### Returns

`void`

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerFixture.ts:23](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerFixture.ts#L23)

___

### waitForConnection

▸ **waitForConnection**(): `Promise`<[`WebMessageServerConnectionFixture`](WebMessageServerConnectionFixture.md)\>

#### Returns

`Promise`<[`WebMessageServerConnectionFixture`](WebMessageServerConnectionFixture.md)\>

#### Defined in

[packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerFixture.ts:17](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/testFixtures/WebMessageServerFixture.ts#L17)
6 changes: 3 additions & 3 deletions docs/api/classes/WebMessengerGuestSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ https://developer.genesys.cloud/api/digital/webmessaging/websocketapi#configure-

### constructor

• **new WebMessengerGuestSession**(`config`, `participantData?`, `wsFactory?`, `messageDelayer?`)
• **new WebMessengerGuestSession**(`config`, `participantData?`, `messageDelayer?`, `wsFactory?`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `config` | [`SessionConfig`](../interfaces/SessionConfig.md) |
| `participantData` | `Record`<`string`, `string`\> |
| `wsFactory` | (`url`: `string`, `options?`: `ClientRequestArgs` \| `ClientOptions`) => `WebSocket` |
| `messageDelayer` | [`MessageDelayer`](../interfaces/MessageDelayer.md) |
| `wsFactory` | (`url`: `string`, `options?`: `ClientRequestArgs` \| `ClientOptions`) => `WebSocket` |

#### Overrides

Expand Down Expand Up @@ -99,7 +99,7 @@ EventEmitter.constructor

#### Defined in

[packages/genesys-web-messaging-tester/src/genesys/WebMessengerGuestSession.ts:54](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/WebMessengerGuestSession.ts#L54)
[packages/genesys-web-messaging-tester/src/genesys/WebMessengerGuestSession.ts:55](https://github.com/ovotech/genesys-web-messaging-tester/blob/main/packages/genesys-web-messaging-tester/src/genesys/WebMessengerGuestSession.ts#L55)

___

Expand Down
2 changes: 1 addition & 1 deletion docs/api/interfaces/MessageDelayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ due to it being async and not guaranteeing order.

| Name | Type |
| :------ | :------ |
| `message` | `Response`<`unknown`\> |
| `message` | [`Response`](../README.md#response)<`unknown`\> |
| `whenReceived` | `Date` |

#### Returns
Expand Down
2 changes: 1 addition & 1 deletion docs/release-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tag created last._

## Beta releases

1. Suffix the versions with `-beta.0`, increase the number for subsequent publishes
1. Suffix the versions with `-beta.0` (increase the number for subsequent publishes)
2. Publish the beta version
```
npm publish --tag beta
Expand Down
Loading
Loading