From c6f63546af58470e7f5bff98670db85a84f45e72 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 25 Aug 2021 13:40:24 +0200 Subject: [PATCH 1/4] feat: add id to chat prompt --- packages/chat-types/src/types.ts | 4 ++-- packages/chat-types/src/utils.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/chat-types/src/types.ts b/packages/chat-types/src/types.ts index b34b3e368..0c16c7fa6 100644 --- a/packages/chat-types/src/types.ts +++ b/packages/chat-types/src/types.ts @@ -1,5 +1,5 @@ -import { Text } from '@voiceflow/base-types'; +import { Node as BaseNode, Text } from '@voiceflow/base-types'; -export interface Prompt { +export interface Prompt extends BaseNode.Utils.DataID { content: Text.SlateTextValue; } diff --git a/packages/chat-types/src/utils.ts b/packages/chat-types/src/utils.ts index c6323ee6b..d930a2d2e 100644 --- a/packages/chat-types/src/utils.ts +++ b/packages/chat-types/src/utils.ts @@ -8,6 +8,7 @@ export const defaultPrompt = (prompt: Nullable | undefined): Nullable Date: Wed, 25 Aug 2021 11:45:04 +0000 Subject: [PATCH 2/4] chore(release): publish - @voiceflow/chat-types@1.3.0 --- packages/chat-types/CHANGELOG.md | 11 +++++++++++ packages/chat-types/package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/chat-types/CHANGELOG.md b/packages/chat-types/CHANGELOG.md index ec690896c..d6853b602 100644 --- a/packages/chat-types/CHANGELOG.md +++ b/packages/chat-types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.3.0](https://github.com/voiceflow/libs/compare/@voiceflow/chat-types@1.2.3...@voiceflow/chat-types@1.3.0) (2021-08-25) + + +### Features + +* add id to chat prompt ([c6f6354](https://github.com/voiceflow/libs/commit/c6f63546af58470e7f5bff98670db85a84f45e72)) + + + + + ## [1.2.3](https://github.com/voiceflow/libs/compare/@voiceflow/chat-types@1.2.2...@voiceflow/chat-types@1.2.3) (2021-08-23) **Note:** Version bump only for package @voiceflow/chat-types diff --git a/packages/chat-types/package.json b/packages/chat-types/package.json index 84fa86755..04fcf0b72 100644 --- a/packages/chat-types/package.json +++ b/packages/chat-types/package.json @@ -1,7 +1,7 @@ { "name": "@voiceflow/chat-types", "description": "Voiceflow chat project types", - "version": "1.2.3", + "version": "1.3.0", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" From d95ba808e811c28d9cdf0105e536efeab74f74f3 Mon Sep 17 00:00:00 2001 From: Evgeny Zaytsev Date: Wed, 25 Aug 2021 18:40:48 +0300 Subject: [PATCH 3/4] feat: chat intent input type (VF-000) (#50) --- packages/api-sdk/src/models/shared.ts | 2 +- packages/chat-types/src/types.ts | 20 ++++++++++++++++++++ packages/chat-types/src/version/index.ts | 6 ++++-- packages/voice-types/src/types.ts | 21 +++++++++++++++++++++ packages/voice-types/src/version/index.ts | 6 ++++-- 5 files changed, 50 insertions(+), 5 deletions(-) diff --git a/packages/api-sdk/src/models/shared.ts b/packages/api-sdk/src/models/shared.ts index ab6cee071..f42f5e146 100644 --- a/packages/api-sdk/src/models/shared.ts +++ b/packages/api-sdk/src/models/shared.ts @@ -47,7 +47,7 @@ export const SDiagramID = s.string(); export type DiagramID = s.StructType; export const SIntentInput = s.object({ - text: s.string(), + text: s.any() as s.Struct, slots: s.optional(s.array(s.string())), voice: s.optional(s.string()), }); diff --git a/packages/chat-types/src/types.ts b/packages/chat-types/src/types.ts index 0c16c7fa6..efe03296d 100644 --- a/packages/chat-types/src/types.ts +++ b/packages/chat-types/src/types.ts @@ -1,5 +1,25 @@ +import type * as ApiSDK from '@voiceflow/api-sdk'; import { Node as BaseNode, Text } from '@voiceflow/base-types'; export interface Prompt extends BaseNode.Utils.DataID { content: Text.SlateTextValue; } + +export interface IntentInput extends ApiSDK.IntentInput { + text: Text.SlateTextValue; +} + +export interface IntentSlotDialog extends ApiSDK.IntentSlotDialog { + prompt: IntentInput[]; + confirm: IntentInput[]; + utterances: IntentInput[]; +} + +export interface IntentSlot extends ApiSDK.IntentSlot { + dialog: IntentSlotDialog; +} + +export interface Intent extends ApiSDK.Intent { + slots?: IntentSlot[]; + inputs: IntentInput[]; +} diff --git a/packages/chat-types/src/version/index.ts b/packages/chat-types/src/version/index.ts index ddaa548e6..dd53a8b02 100644 --- a/packages/chat-types/src/version/index.ts +++ b/packages/chat-types/src/version/index.ts @@ -1,17 +1,19 @@ import { Version } from '@voiceflow/base-types'; -import { Prompt } from '@/types'; +import { Intent, Prompt } from '@/types'; import { ChatVersionSettings, defaultChatVersionSettings } from './settings'; export * from './settings'; export interface ChatVersionData extends Version.BaseVersionData { + intents: Intent[]; settings: ChatVersionSettings; } -export const defaultChatVersionData = ({ settings, ...data }: Partial): ChatVersionData => ({ +export const defaultChatVersionData = ({ intents = [], settings, ...data }: Partial): ChatVersionData => ({ ...Version.defaultBaseVersionData(data), + intents, settings: defaultChatVersionSettings(settings), }); diff --git a/packages/voice-types/src/types.ts b/packages/voice-types/src/types.ts index a6f4e2fd7..7a5e9451b 100644 --- a/packages/voice-types/src/types.ts +++ b/packages/voice-types/src/types.ts @@ -1,5 +1,26 @@ +import type * as ApiSDK from '@voiceflow/api-sdk'; + export interface Prompt { desc?: string; // desc when voice is 'audio' voice: V; content: string; } + +export interface IntentInput extends ApiSDK.IntentInput { + text: string; +} + +export interface IntentSlotDialog extends ApiSDK.IntentSlotDialog { + prompt: IntentInput[]; + confirm: IntentInput[]; + utterances: IntentInput[]; +} + +export interface IntentSlot extends ApiSDK.IntentSlot { + dialog: IntentSlotDialog; +} + +export interface Intent extends ApiSDK.Intent { + slots?: IntentSlot[]; + inputs: IntentInput[]; +} diff --git a/packages/voice-types/src/version/index.ts b/packages/voice-types/src/version/index.ts index bb168047e..666fa0cc9 100644 --- a/packages/voice-types/src/version/index.ts +++ b/packages/voice-types/src/version/index.ts @@ -1,20 +1,22 @@ import { Version } from '@voiceflow/base-types'; -import { Prompt } from '@/types'; +import { Intent, Prompt } from '@/types'; import { defaultVoiceVersionSettings, VoiceVersionSettings } from './settings'; export * from './settings'; export interface VoiceVersionData extends Version.BaseVersionData> { + intents: Intent[]; settings: VoiceVersionSettings; } export const defaultVoiceVersionData = ( - { settings, ...data }: Partial>, + { intents = [], settings, ...data }: Partial>, options: { defaultPromptVoice: Voice } ): VoiceVersionData => ({ ...Version.defaultBaseVersionData>(data), + intents, settings: defaultVoiceVersionSettings(settings, options), }); From 163af7fdbed51771f09f4bad59f44f1698e562ad Mon Sep 17 00:00:00 2001 From: Voiceflow Date: Wed, 25 Aug 2021 15:45:26 +0000 Subject: [PATCH 4/4] chore(release): publish - @voiceflow/alexa-types@1.52.24 - @voiceflow/api-sdk@1.37.0 - @voiceflow/base-types@1.3.2 - @voiceflow/chat-types@1.4.0 - @voiceflow/general-types@1.55.3 - @voiceflow/google-dfes-types@1.2.10 - @voiceflow/google-types@1.34.9 - @voiceflow/voice-types@1.4.0 --- packages/alexa-types/CHANGELOG.md | 8 ++++++++ packages/alexa-types/package.json | 10 +++++----- packages/api-sdk/CHANGELOG.md | 11 +++++++++++ packages/api-sdk/package.json | 2 +- packages/base-types/CHANGELOG.md | 8 ++++++++ packages/base-types/package.json | 4 ++-- packages/chat-types/CHANGELOG.md | 11 +++++++++++ packages/chat-types/package.json | 6 +++--- packages/general-types/CHANGELOG.md | 8 ++++++++ packages/general-types/package.json | 8 ++++---- packages/google-dfes-types/CHANGELOG.md | 8 ++++++++ packages/google-dfes-types/package.json | 8 ++++---- packages/google-types/CHANGELOG.md | 8 ++++++++ packages/google-types/package.json | 8 ++++---- packages/voice-types/CHANGELOG.md | 11 +++++++++++ packages/voice-types/package.json | 6 +++--- 16 files changed, 99 insertions(+), 26 deletions(-) diff --git a/packages/alexa-types/CHANGELOG.md b/packages/alexa-types/CHANGELOG.md index d66e6d452..228b8e10c 100644 --- a/packages/alexa-types/CHANGELOG.md +++ b/packages/alexa-types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.52.24](https://github.com/voiceflow/libs/compare/@voiceflow/alexa-types@1.52.23...@voiceflow/alexa-types@1.52.24) (2021-08-25) + +**Note:** Version bump only for package @voiceflow/alexa-types + + + + + ## [1.52.23](https://github.com/voiceflow/libs/compare/@voiceflow/alexa-types@1.52.22...@voiceflow/alexa-types@1.52.23) (2021-08-23) **Note:** Version bump only for package @voiceflow/alexa-types diff --git a/packages/alexa-types/package.json b/packages/alexa-types/package.json index 30360f2fc..b76c1f48f 100644 --- a/packages/alexa-types/package.json +++ b/packages/alexa-types/package.json @@ -1,17 +1,17 @@ { "name": "@voiceflow/alexa-types", "description": "Alexa service types", - "version": "1.52.23", + "version": "1.52.24", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" }, "dependencies": { - "@voiceflow/api-sdk": "^1.36.0", - "@voiceflow/base-types": "^1.3.1", + "@voiceflow/api-sdk": "^1.37.0", + "@voiceflow/base-types": "^1.3.2", "@voiceflow/common": "6.5.0", - "@voiceflow/general-types": "^1.55.2", - "@voiceflow/voice-types": "^1.3.3", + "@voiceflow/general-types": "^1.55.3", + "@voiceflow/voice-types": "^1.4.0", "ask-smapi-model": "1.14.0" }, "files": [ diff --git a/packages/api-sdk/CHANGELOG.md b/packages/api-sdk/CHANGELOG.md index e1ccbcfd2..6fdcf56de 100644 --- a/packages/api-sdk/CHANGELOG.md +++ b/packages/api-sdk/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.37.0](https://github.com/voiceflow/libs/compare/@voiceflow/api-sdk@1.36.0...@voiceflow/api-sdk@1.37.0) (2021-08-25) + + +### Features + +* chat intent input type (VF-000) ([#50](https://github.com/voiceflow/libs/issues/50)) ([d95ba80](https://github.com/voiceflow/libs/commit/d95ba808e811c28d9cdf0105e536efeab74f74f3)) + + + + + # [1.36.0](https://github.com/voiceflow/libs/compare/@voiceflow/api-sdk@1.35.1...@voiceflow/api-sdk@1.36.0) (2021-08-18) diff --git a/packages/api-sdk/package.json b/packages/api-sdk/package.json index c1f9b0e9e..b1992a41a 100644 --- a/packages/api-sdk/package.json +++ b/packages/api-sdk/package.json @@ -1,7 +1,7 @@ { "name": "@voiceflow/api-sdk", "description": "wrapper for creator-api", - "version": "1.36.0", + "version": "1.37.0", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" diff --git a/packages/base-types/CHANGELOG.md b/packages/base-types/CHANGELOG.md index c76662cdc..7847f8436 100644 --- a/packages/base-types/CHANGELOG.md +++ b/packages/base-types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.3.2](https://github.com/voiceflow/libs/compare/@voiceflow/base-types@1.3.1...@voiceflow/base-types@1.3.2) (2021-08-25) + +**Note:** Version bump only for package @voiceflow/base-types + + + + + ## [1.3.1](https://github.com/voiceflow/libs/compare/@voiceflow/base-types@1.3.0...@voiceflow/base-types@1.3.1) (2021-08-23) diff --git a/packages/base-types/package.json b/packages/base-types/package.json index 8086ab01b..1f191278e 100644 --- a/packages/base-types/package.json +++ b/packages/base-types/package.json @@ -1,13 +1,13 @@ { "name": "@voiceflow/base-types", "description": "Voiceflow base project types", - "version": "1.3.1", + "version": "1.3.2", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" }, "dependencies": { - "@voiceflow/api-sdk": "^1.36.0", + "@voiceflow/api-sdk": "^1.37.0", "slate": "^0.63.0" }, "files": [ diff --git a/packages/chat-types/CHANGELOG.md b/packages/chat-types/CHANGELOG.md index d6853b602..af1663db4 100644 --- a/packages/chat-types/CHANGELOG.md +++ b/packages/chat-types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.4.0](https://github.com/voiceflow/libs/compare/@voiceflow/chat-types@1.3.0...@voiceflow/chat-types@1.4.0) (2021-08-25) + + +### Features + +* chat intent input type (VF-000) ([#50](https://github.com/voiceflow/libs/issues/50)) ([d95ba80](https://github.com/voiceflow/libs/commit/d95ba808e811c28d9cdf0105e536efeab74f74f3)) + + + + + # [1.3.0](https://github.com/voiceflow/libs/compare/@voiceflow/chat-types@1.2.3...@voiceflow/chat-types@1.3.0) (2021-08-25) diff --git a/packages/chat-types/package.json b/packages/chat-types/package.json index 04fcf0b72..79dbf52f7 100644 --- a/packages/chat-types/package.json +++ b/packages/chat-types/package.json @@ -1,14 +1,14 @@ { "name": "@voiceflow/chat-types", "description": "Voiceflow chat project types", - "version": "1.3.0", + "version": "1.4.0", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" }, "dependencies": { - "@voiceflow/api-sdk": "^1.36.0", - "@voiceflow/base-types": "^1.3.1" + "@voiceflow/api-sdk": "^1.37.0", + "@voiceflow/base-types": "^1.3.2" }, "files": [ "build" diff --git a/packages/general-types/CHANGELOG.md b/packages/general-types/CHANGELOG.md index f5a8f7539..b4a3653b7 100644 --- a/packages/general-types/CHANGELOG.md +++ b/packages/general-types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.55.3](https://github.com/voiceflow/libs/compare/@voiceflow/general-types@1.55.2...@voiceflow/general-types@1.55.3) (2021-08-25) + +**Note:** Version bump only for package @voiceflow/general-types + + + + + ## [1.55.2](https://github.com/voiceflow/libs/compare/@voiceflow/general-types@1.55.1...@voiceflow/general-types@1.55.2) (2021-08-23) **Note:** Version bump only for package @voiceflow/general-types diff --git a/packages/general-types/package.json b/packages/general-types/package.json index 680c637ea..79a59d802 100644 --- a/packages/general-types/package.json +++ b/packages/general-types/package.json @@ -1,15 +1,15 @@ { "name": "@voiceflow/general-types", "description": "Voiceflow general project types", - "version": "1.55.2", + "version": "1.55.3", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" }, "dependencies": { - "@voiceflow/api-sdk": "^1.36.0", - "@voiceflow/base-types": "^1.3.1", - "@voiceflow/voice-types": "^1.3.3" + "@voiceflow/api-sdk": "^1.37.0", + "@voiceflow/base-types": "^1.3.2", + "@voiceflow/voice-types": "^1.4.0" }, "files": [ "build" diff --git a/packages/google-dfes-types/CHANGELOG.md b/packages/google-dfes-types/CHANGELOG.md index ce2195af6..0a82ebfa0 100644 --- a/packages/google-dfes-types/CHANGELOG.md +++ b/packages/google-dfes-types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.2.10](https://github.com/voiceflow/libs/compare/@voiceflow/google-dfes-types@1.2.9...@voiceflow/google-dfes-types@1.2.10) (2021-08-25) + +**Note:** Version bump only for package @voiceflow/google-dfes-types + + + + + ## [1.2.9](https://github.com/voiceflow/libs/compare/@voiceflow/google-dfes-types@1.2.8...@voiceflow/google-dfes-types@1.2.9) (2021-08-23) **Note:** Version bump only for package @voiceflow/google-dfes-types diff --git a/packages/google-dfes-types/package.json b/packages/google-dfes-types/package.json index c9dc51d4c..fd41b01a4 100644 --- a/packages/google-dfes-types/package.json +++ b/packages/google-dfes-types/package.json @@ -1,16 +1,16 @@ { "name": "@voiceflow/google-dfes-types", "description": "Google DF-ES service types", - "version": "1.2.9", + "version": "1.2.10", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" }, "dependencies": { - "@voiceflow/api-sdk": "^1.36.0", - "@voiceflow/base-types": "^1.3.1", + "@voiceflow/api-sdk": "^1.37.0", + "@voiceflow/base-types": "^1.3.2", "@voiceflow/common": "^6.6.2", - "@voiceflow/google-types": "^1.34.8" + "@voiceflow/google-types": "^1.34.9" }, "files": [ "build" diff --git a/packages/google-types/CHANGELOG.md b/packages/google-types/CHANGELOG.md index 20157fdd8..7ae16f222 100644 --- a/packages/google-types/CHANGELOG.md +++ b/packages/google-types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.34.9](https://github.com/voiceflow/libs/compare/@voiceflow/google-types@1.34.8...@voiceflow/google-types@1.34.9) (2021-08-25) + +**Note:** Version bump only for package @voiceflow/google-types + + + + + ## [1.34.8](https://github.com/voiceflow/libs/compare/@voiceflow/google-types@1.34.7...@voiceflow/google-types@1.34.8) (2021-08-23) **Note:** Version bump only for package @voiceflow/google-types diff --git a/packages/google-types/package.json b/packages/google-types/package.json index 605bdc490..30933b3b8 100644 --- a/packages/google-types/package.json +++ b/packages/google-types/package.json @@ -1,16 +1,16 @@ { "name": "@voiceflow/google-types", "description": "Google service types", - "version": "1.34.8", + "version": "1.34.9", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" }, "dependencies": { - "@voiceflow/api-sdk": "^1.36.0", - "@voiceflow/base-types": "^1.3.1", + "@voiceflow/api-sdk": "^1.37.0", + "@voiceflow/base-types": "^1.3.2", "@voiceflow/common": "6.5.0", - "@voiceflow/voice-types": "^1.3.3", + "@voiceflow/voice-types": "^1.4.0", "googleapis": "^60.0.1" }, "files": [ diff --git a/packages/voice-types/CHANGELOG.md b/packages/voice-types/CHANGELOG.md index 05e325f28..c8744ef25 100644 --- a/packages/voice-types/CHANGELOG.md +++ b/packages/voice-types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.4.0](https://github.com/voiceflow/libs/compare/@voiceflow/voice-types@1.3.3...@voiceflow/voice-types@1.4.0) (2021-08-25) + + +### Features + +* chat intent input type (VF-000) ([#50](https://github.com/voiceflow/libs/issues/50)) ([d95ba80](https://github.com/voiceflow/libs/commit/d95ba808e811c28d9cdf0105e536efeab74f74f3)) + + + + + ## [1.3.3](https://github.com/voiceflow/libs/compare/@voiceflow/voice-types@1.3.2...@voiceflow/voice-types@1.3.3) (2021-08-23) **Note:** Version bump only for package @voiceflow/voice-types diff --git a/packages/voice-types/package.json b/packages/voice-types/package.json index 55eb8500e..6f3050ac7 100644 --- a/packages/voice-types/package.json +++ b/packages/voice-types/package.json @@ -1,14 +1,14 @@ { "name": "@voiceflow/voice-types", "description": "Voiceflow voice project types", - "version": "1.3.3", + "version": "1.4.0", "author": "Voiceflow", "bugs": { "url": "https://github.com/voiceflow/libs/issues" }, "dependencies": { - "@voiceflow/api-sdk": "^1.36.0", - "@voiceflow/base-types": "^1.3.1" + "@voiceflow/api-sdk": "^1.37.0", + "@voiceflow/base-types": "^1.3.2" }, "files": [ "build"