diff --git a/package-lock.json b/package-lock.json index 222691a..605873f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9242,7 +9242,7 @@ }, "packages/chat-core": { "name": "@yext/chat-core", - "version": "0.9.0", + "version": "0.9.1", "license": "BSD-3-Clause", "dependencies": { "cross-fetch": "^3.1.5" diff --git a/packages/chat-core/docs/chat-core.integrationdetails.md b/packages/chat-core/docs/chat-core.integrationdetails.md index ff6e430..8cf2947 100644 --- a/packages/chat-core/docs/chat-core.integrationdetails.md +++ b/packages/chat-core/docs/chat-core.integrationdetails.md @@ -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. | diff --git a/packages/chat-core/docs/chat-core.integrationdetails.zendeskhandoff.md b/packages/chat-core/docs/chat-core.integrationdetails.zendeskhandoff.md new file mode 100644 index 0000000..bffe5fe --- /dev/null +++ b/packages/chat-core/docs/chat-core.integrationdetails.zendeskhandoff.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [IntegrationDetails](./chat-core.integrationdetails.md) > [zendeskHandoff](./chat-core.integrationdetails.zendeskhandoff.md) + +## IntegrationDetails.zendeskHandoff property + +Configurations for Zendesk handoff. + +**Signature:** + +```typescript +zendeskHandoff?: ZendeskHandoff; +``` diff --git a/packages/chat-core/docs/chat-core.md b/packages/chat-core/docs/chat-core.md index 7371156..50c9dfb 100644 --- a/packages/chat-core/docs/chat-core.md +++ b/packages/chat-core/docs/chat-core.md @@ -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. | @@ -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 diff --git a/packages/chat-core/docs/chat-core.message.md b/packages/chat-core/docs/chat-core.message.md deleted file mode 100644 index 6237e60..0000000 --- a/packages/chat-core/docs/chat-core.message.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message](./chat-core.message.md) - -## Message interface - -Represents a message within a conversation. - -**Signature:** - -```typescript -export interface Message -``` - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [responseId?](./chat-core.message.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.source.md) | | [EnumOrLiteral](./chat-core.enumorliteral.md)<[MessageSource](./chat-core.messagesource.md)> | The sender of the message. | -| [text](./chat-core.message.text.md) | | string | The message's content. | -| [timestamp?](./chat-core.message.timestamp.md) | | string | _(Optional)_ Time when the message is sent. | - diff --git a/packages/chat-core/docs/chat-core.message_2.md b/packages/chat-core/docs/chat-core.message_2.md new file mode 100644 index 0000000..948ba51 --- /dev/null +++ b/packages/chat-core/docs/chat-core.message_2.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [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)<[MessageSource](./chat-core.messagesource_2.md)> | 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. | + diff --git a/packages/chat-core/docs/chat-core.message.responseid.md b/packages/chat-core/docs/chat-core.message_2.responseid.md similarity index 68% rename from packages/chat-core/docs/chat-core.message.responseid.md rename to packages/chat-core/docs/chat-core.message_2.responseid.md index 5b49681..3168aa5 100644 --- a/packages/chat-core/docs/chat-core.message.responseid.md +++ b/packages/chat-core/docs/chat-core.message_2.responseid.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message](./chat-core.message.md) > [responseId](./chat-core.message.responseid.md) +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message\_2](./chat-core.message_2.md) > [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. diff --git a/packages/chat-core/docs/chat-core.message.source.md b/packages/chat-core/docs/chat-core.message_2.source.md similarity index 65% rename from packages/chat-core/docs/chat-core.message.source.md rename to packages/chat-core/docs/chat-core.message_2.source.md index 8fd0635..eca6537 100644 --- a/packages/chat-core/docs/chat-core.message.source.md +++ b/packages/chat-core/docs/chat-core.message_2.source.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message](./chat-core.message.md) > [source](./chat-core.message.source.md) +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message\_2](./chat-core.message_2.md) > [source](./chat-core.message_2.source.md) -## Message.source property +## Message\_2.source property The sender of the message. diff --git a/packages/chat-core/docs/chat-core.message.text.md b/packages/chat-core/docs/chat-core.message_2.text.md similarity index 64% rename from packages/chat-core/docs/chat-core.message.text.md rename to packages/chat-core/docs/chat-core.message_2.text.md index 462c335..c1ab2b6 100644 --- a/packages/chat-core/docs/chat-core.message.text.md +++ b/packages/chat-core/docs/chat-core.message_2.text.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message](./chat-core.message.md) > [text](./chat-core.message.text.md) +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message\_2](./chat-core.message_2.md) > [text](./chat-core.message_2.text.md) -## Message.text property +## Message\_2.text property The message's content. diff --git a/packages/chat-core/docs/chat-core.message.timestamp.md b/packages/chat-core/docs/chat-core.message_2.timestamp.md similarity index 63% rename from packages/chat-core/docs/chat-core.message.timestamp.md rename to packages/chat-core/docs/chat-core.message_2.timestamp.md index 20bd14b..8522e7a 100644 --- a/packages/chat-core/docs/chat-core.message.timestamp.md +++ b/packages/chat-core/docs/chat-core.message_2.timestamp.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message](./chat-core.message.md) > [timestamp](./chat-core.message.timestamp.md) +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [Message\_2](./chat-core.message_2.md) > [timestamp](./chat-core.message_2.timestamp.md) -## Message.timestamp property +## Message\_2.timestamp property Time when the message is sent. diff --git a/packages/chat-core/docs/chat-core.messagerequest.md b/packages/chat-core/docs/chat-core.messagerequest.md index d6d0ef1..a056c82 100644 --- a/packages/chat-core/docs/chat-core.messagerequest.md +++ b/packages/chat-core/docs/chat-core.messagerequest.md @@ -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 bot’s "memory" regarding what work it previously did to help determine future actions. | diff --git a/packages/chat-core/docs/chat-core.messageresponse.md b/packages/chat-core/docs/chat-core.messageresponse.md index f4ff3cc..0412522 100644 --- a/packages/chat-core/docs/chat-core.messageresponse.md +++ b/packages/chat-core/docs/chat-core.messageresponse.md @@ -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 bot’s "memory" regarding what work it previously did to help determine future actions. | diff --git a/packages/chat-core/docs/chat-core.messagesource.md b/packages/chat-core/docs/chat-core.messagesource_2.md similarity index 84% rename from packages/chat-core/docs/chat-core.messagesource.md rename to packages/chat-core/docs/chat-core.messagesource_2.md index f45dcfd..5801d0a 100644 --- a/packages/chat-core/docs/chat-core.messagesource.md +++ b/packages/chat-core/docs/chat-core.messagesource_2.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [MessageSource](./chat-core.messagesource.md) +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [MessageSource\_2](./chat-core.messagesource_2.md) -## MessageSource enum +## MessageSource\_2 enum Types of sender of a message. diff --git a/packages/chat-core/docs/chat-core.zendeskhandoff.md b/packages/chat-core/docs/chat-core.zendeskhandoff.md new file mode 100644 index 0000000..1085831 --- /dev/null +++ b/packages/chat-core/docs/chat-core.zendeskhandoff.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [ZendeskHandoff](./chat-core.zendeskhandoff.md) + +## ZendeskHandoff interface + +Configurations for Zendesk handoff. + +**Signature:** + +```typescript +export interface ZendeskHandoff +``` diff --git a/packages/chat-core/etc/chat-core.api.md b/packages/chat-core/etc/chat-core.api.md index aeba2f7..879fe35 100644 --- a/packages/chat-core/etc/chat-core.api.md +++ b/packages/chat-core/etc/chat-core.api.md @@ -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 @@ -87,12 +88,13 @@ export interface InternalConfig { } // @public -export interface Message { +interface Message_2 { responseId?: string; - source: EnumOrLiteral; + source: EnumOrLiteral; text: string; timestamp?: string; } +export { Message_2 as Message } // @public export interface MessageNotes { @@ -110,7 +112,7 @@ export interface MessageNotes { export interface MessageRequest { context?: any; conversationId?: string; - messages: Message[]; + messages: Message_2[]; notes?: MessageNotes; } @@ -118,16 +120,17 @@ export interface MessageRequest { 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; @@ -188,6 +191,10 @@ export interface TokenStreamEvent { event: EnumOrLiteral; } +// @public +export interface ZendeskHandoff { +} + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/chat-core/package.json b/packages/chat-core/package.json index 01c3a71..3baa3e9 100644 --- a/packages/chat-core/package.json +++ b/packages/chat-core/package.json @@ -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", diff --git a/packages/chat-core/src/models/index.ts b/packages/chat-core/src/models/index.ts index 0821325..19bc9ed 100644 --- a/packages/chat-core/src/models/index.ts +++ b/packages/chat-core/src/models/index.ts @@ -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"; diff --git a/packages/chat-core/src/models/integrations/IntegrationDetails.ts b/packages/chat-core/src/models/integrations/IntegrationDetails.ts index 28712c6..012eacf 100644 --- a/packages/chat-core/src/models/integrations/IntegrationDetails.ts +++ b/packages/chat-core/src/models/integrations/IntegrationDetails.ts @@ -1,4 +1,5 @@ import { AwsConnectHandoff } from "./AwsConnect"; +import { ZendeskHandoff } from "./Zendesk"; /** * Integration details for the current conversation. @@ -11,4 +12,6 @@ import { AwsConnectHandoff } from "./AwsConnect"; export interface IntegrationDetails { /** {@inheritdoc AwsConnectHandoff} */ awsConnectHandoff?: AwsConnectHandoff; + /** {@inheritdoc ZendeskHandoff} */ + zendeskHandoff?: ZendeskHandoff; } diff --git a/packages/chat-core/src/models/integrations/Zendesk.ts b/packages/chat-core/src/models/integrations/Zendesk.ts new file mode 100644 index 0000000..32cf9c3 --- /dev/null +++ b/packages/chat-core/src/models/integrations/Zendesk.ts @@ -0,0 +1,7 @@ +/** + * Configurations for Zendesk handoff. + * + * @public + */ +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface ZendeskHandoff {}