Skip to content

Commit

Permalink
add zendeskHandoff type
Browse files Browse the repository at this point in the history
  • Loading branch information
Yen Truong committed Sep 10, 2024
1 parent b2d1e1c commit ed3a9f3
Show file tree
Hide file tree
Showing 19 changed files with 90 additions and 45 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/chat-core/docs/chat-core.integrationdetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ This is only present when the conversation is integrated with a third-party serv
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [awsConnectHandoff?](./chat-core.integrationdetails.awsconnecthandoff.md) | | [AwsConnectHandoff](./chat-core.awsconnecthandoff.md) | _(Optional)_ Configurations for AWS Connect handoff. |
| [zendeskHandoff?](./chat-core.integrationdetails.zendeskhandoff.md) | | [ZendeskHandoff](./chat-core.zendeskhandoff.md) | _(Optional)_ Configurations for Zendesk handoff. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [IntegrationDetails](./chat-core.integrationdetails.md) &gt; [zendeskHandoff](./chat-core.integrationdetails.zendeskhandoff.md)

## IntegrationDetails.zendeskHandoff property

Configurations for Zendesk handoff.

**Signature:**

```typescript
zendeskHandoff?: ZendeskHandoff;
```
5 changes: 3 additions & 2 deletions packages/chat-core/docs/chat-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
| Enumeration | Description |
| --- | --- |
| [Environment](./chat-core.environment.md) | Defines the environment of the API domains. |
| [MessageSource](./chat-core.messagesource.md) | Types of sender of a message. |
| [MessageSource\_2](./chat-core.messagesource_2.md) | Types of sender of a message. |
| [Region](./chat-core.region.md) | The region to send the requests to. |
| [StreamEventName](./chat-core.streameventname.md) | Names of stream events returned from Chat Stream API. |

Expand All @@ -37,13 +37,14 @@
| [EndEvent](./chat-core.endevent.md) | An event that indicates end of Chat stream. |
| [Endpoints](./chat-core.endpoints.md) | The URLs which are used when making requests to the Chat API. |
| [IntegrationDetails](./chat-core.integrationdetails.md) | Integration details for the current conversation. |
| [Message](./chat-core.message.md) | Represents a message within a conversation. |
| [Message\_2](./chat-core.message_2.md) | Represents a message within a conversation. |
| [MessageNotes](./chat-core.messagenotes.md) | Information relevant to the current state of the conversation, serving as the bot’s "memory" regarding what work it previously did to help determine future actions. |
| [MessageRequest](./chat-core.messagerequest.md) | A request to Chat API. |
| [MessageResponse](./chat-core.messageresponse.md) | A response from Chat API. |
| [StartEvent](./chat-core.startevent.md) | An event that indicates start of Chat stream. |
| [TokenStreamData](./chat-core.tokenstreamdata.md) | Data returned from a [TokenStreamEvent](./chat-core.tokenstreamevent.md)<!-- -->. |
| [TokenStreamEvent](./chat-core.tokenstreamevent.md) | An event that carries a partial response. |
| [ZendeskHandoff](./chat-core.zendeskhandoff.md) | Configurations for Zendesk handoff. |

## Type Aliases

Expand Down
23 changes: 0 additions & 23 deletions packages/chat-core/docs/chat-core.message.md

This file was deleted.

23 changes: 23 additions & 0 deletions packages/chat-core/docs/chat-core.message_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message\_2](./chat-core.message_2.md)

## Message\_2 interface

Represents a message within a conversation.

**Signature:**

```typescript
export interface Message
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [responseId?](./chat-core.message_2.responseid.md) | | string | _(Optional)_ The response's id in the form of a 26 character ULID. This is present for message coming from server. |
| [source](./chat-core.message_2.source.md) | | [EnumOrLiteral](./chat-core.enumorliteral.md)<!-- -->&lt;[MessageSource](./chat-core.messagesource_2.md)<!-- -->&gt; | The sender of the message. |
| [text](./chat-core.message_2.text.md) | | string | The message's content. |
| [timestamp?](./chat-core.message_2.timestamp.md) | | string | _(Optional)_ Time when the message is sent. |

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message](./chat-core.message.md) &gt; [responseId](./chat-core.message.responseid.md)
[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message\_2](./chat-core.message_2.md) &gt; [responseId](./chat-core.message_2.responseid.md)

## Message.responseId property
## Message\_2.responseId property

The response's id in the form of a 26 character ULID. This is present for message coming from server.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message](./chat-core.message.md) &gt; [source](./chat-core.message.source.md)
[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message\_2](./chat-core.message_2.md) &gt; [source](./chat-core.message_2.source.md)

## Message.source property
## Message\_2.source property

The sender of the message.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message](./chat-core.message.md) &gt; [text](./chat-core.message.text.md)
[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message\_2](./chat-core.message_2.md) &gt; [text](./chat-core.message_2.text.md)

## Message.text property
## Message\_2.text property

The message's content.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message](./chat-core.message.md) &gt; [timestamp](./chat-core.message.timestamp.md)
[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [Message\_2](./chat-core.message_2.md) &gt; [timestamp](./chat-core.message_2.timestamp.md)

## Message.timestamp property
## Message\_2.timestamp property

Time when the message is sent.

Expand Down
2 changes: 1 addition & 1 deletion packages/chat-core/docs/chat-core.messagerequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export interface MessageRequest
| --- | --- | --- | --- |
| [context?](./chat-core.messagerequest.context.md) | | any | _(Optional)_ Additional information to pass into the instruction flow. This data could then be used in the URL or body of a REST API step, influence Chat API's assessment in a conditional step, or help construct a reply with additional details. |
| [conversationId?](./chat-core.messagerequest.conversationid.md) | | string | _(Optional)_ The id corresponds to the current conversation. This is generated by the server on the first message of the conversation and returned in [MessageResponse](./chat-core.messageresponse.md)<!-- -->. |
| [messages](./chat-core.messagerequest.messages.md) | | [Message](./chat-core.message.md)<!-- -->\[\] | The messages of the current conversation. |
| [messages](./chat-core.messagerequest.messages.md) | | [Message](./chat-core.message_2.md)<!-- -->\[\] | The messages of the current conversation. |
| [notes?](./chat-core.messagerequest.notes.md) | | [MessageNotes](./chat-core.messagenotes.md) | _(Optional)_ Information relevant to the current state of the conversation, serving as the bots "memory" regarding what work it previously did to help determine future actions. |

2 changes: 1 addition & 1 deletion packages/chat-core/docs/chat-core.messageresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export interface MessageResponse
| --- | --- | --- | --- |
| [conversationId?](./chat-core.messageresponse.conversationid.md) | | string | _(Optional)_ The id corresponds to the current conversation. |
| [integrationDetails?](./chat-core.messageresponse.integrationdetails.md) | | [IntegrationDetails](./chat-core.integrationdetails.md) | _(Optional)_ Integration details for the current conversation. |
| [message](./chat-core.messageresponse.message.md) | | [Message](./chat-core.message.md) | The generated reply to the latest message in the request. |
| [message](./chat-core.messageresponse.message.md) | | [Message](./chat-core.message_2.md) | The generated reply to the latest message in the request. |
| [notes](./chat-core.messageresponse.notes.md) | | [MessageNotes](./chat-core.messagenotes.md) | Information relevant to the current state of the conversation, serving as the bots "memory" regarding what work it previously did to help determine future actions. |

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [MessageSource](./chat-core.messagesource.md)
[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [MessageSource\_2](./chat-core.messagesource_2.md)

## MessageSource enum
## MessageSource\_2 enum

Types of sender of a message.

Expand Down
13 changes: 13 additions & 0 deletions packages/chat-core/docs/chat-core.zendeskhandoff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/chat-core](./chat-core.md) &gt; [ZendeskHandoff](./chat-core.zendeskhandoff.md)

## ZendeskHandoff interface

Configurations for Zendesk handoff.

**Signature:**

```typescript
export interface ZendeskHandoff
```
17 changes: 12 additions & 5 deletions packages/chat-core/etc/chat-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export enum Environment {
// @public
export interface IntegrationDetails {
awsConnectHandoff?: AwsConnectHandoff;
zendeskHandoff?: ZendeskHandoff;
}

// Warning: (ae-internal-missing-underscore) The name "InternalConfig" should be prefixed with an underscore because the declaration is marked as @internal
Expand All @@ -87,12 +88,13 @@ export interface InternalConfig {
}

// @public
export interface Message {
interface Message_2 {
responseId?: string;
source: EnumOrLiteral<MessageSource>;
source: EnumOrLiteral<MessageSource_2>;
text: string;
timestamp?: string;
}
export { Message_2 as Message }

// @public
export interface MessageNotes {
Expand All @@ -110,24 +112,25 @@ export interface MessageNotes {
export interface MessageRequest {
context?: any;
conversationId?: string;
messages: Message[];
messages: Message_2[];
notes?: MessageNotes;
}

// @public
export interface MessageResponse {
conversationId?: string;
integrationDetails?: IntegrationDetails;
message: Message;
message: Message_2;
notes: MessageNotes;
}

// @public
export enum MessageSource {
enum MessageSource_2 {
AGENT = "AGENT",
BOT = "BOT",
USER = "USER"
}
export { MessageSource_2 as MessageSource }

// @public
export function provideChatCore(config: ChatConfig): ChatCore;
Expand Down Expand Up @@ -188,6 +191,10 @@ export interface TokenStreamEvent {
event: EnumOrLiteral<StreamEventName.TokenStreamEvent>;
}

// @public
export interface ZendeskHandoff {
}

// (No @packageDocumentation comment for this package)

```
2 changes: 1 addition & 1 deletion packages/chat-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/chat-core",
"version": "0.9.0",
"version": "0.9.1",
"description": "Typescript Networking Library for the Yext Chat API",
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/chat-core/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export { StreamEventCallback } from "./endpoints/stream/StreamEventCallback";
export { EnumOrLiteral } from "./utils/EnumOrLiteral";

export { IntegrationDetails } from "./integrations/IntegrationDetails";

export {
AwsConnectHandoff,
AwsConnectCredentials,
} from "./integrations/AwsConnect";
export { ZendeskHandoff } from "./integrations/Zendesk";
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AwsConnectHandoff } from "./AwsConnect";
import { ZendeskHandoff } from "./Zendesk";

/**
* Integration details for the current conversation.
Expand All @@ -11,4 +12,6 @@ import { AwsConnectHandoff } from "./AwsConnect";
export interface IntegrationDetails {
/** {@inheritdoc AwsConnectHandoff} */
awsConnectHandoff?: AwsConnectHandoff;
/** {@inheritdoc ZendeskHandoff} */
zendeskHandoff?: ZendeskHandoff;
}
7 changes: 7 additions & 0 deletions packages/chat-core/src/models/integrations/Zendesk.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Configurations for Zendesk handoff.
*
* @public
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ZendeskHandoff {}

0 comments on commit ed3a9f3

Please sign in to comment.