├── .deployment ├── .gitignore ├── Build ├── Analyzer.ruleset └── stylecop.json ├── CODE_OF_CONDUCT.md ├── Deployment └── azuredeploy.json ├── LICENSE ├── Manifest ├── Admin │ ├── ar.json │ ├── color.png │ ├── de.json │ ├── en.json │ ├── es.json │ ├── fr.json │ ├── he.json │ ├── ja.json │ ├── ko.json │ ├── manifest.json │ ├── outline.png │ ├── pt-BR.json │ ├── ru.json │ ├── zh-CN.json │ └── zh-TW.json └── EndUser │ ├── ar.json │ ├── color.png │ ├── de.json │ ├── en.json │ ├── es.json │ ├── fr.json │ ├── he.json │ ├── ja.json │ ├── ko.json │ ├── manifest.json │ ├── outline.png │ ├── pt-BR.json │ ├── ru.json │ ├── zh-CN.json │ └── zh-TW.json ├── README.md ├── SECURITY.md ├── Source ├── Microsoft.Teams.Apps.CannedResponses.sln └── Microsoft.Teams.Apps.CannedResponses │ ├── Bot │ ├── CannedResponsesActivityHandler.cs │ ├── CannedResponsesActivityHandlerOptions.cs │ ├── CannedResponsesActivityMiddleWare.cs │ ├── CannedResponsesAdapterWithErrorHandler.cs │ └── CannedResponsesLocalizationCultureProvider.cs │ ├── Cards │ ├── AdminCard.cs │ ├── UserCard.cs │ └── WelcomeCard.cs │ ├── ClientApp │ ├── package-lock.json │ ├── package.json │ ├── public │ │ └── index.html │ ├── src │ │ ├── api │ │ │ ├── axios-decorator.ts │ │ │ ├── company-responses-api.ts │ │ │ ├── resources-api.ts │ │ │ └── user-responses-api.ts │ │ ├── app.tsx │ │ ├── components │ │ │ ├── add-new-suggestion.tsx │ │ │ ├── add-user-response.tsx │ │ │ ├── checkbox-base.tsx │ │ │ ├── command-bar.tsx │ │ │ ├── company-responses-command-bar.tsx │ │ │ ├── company-responses.tsx │ │ │ ├── edit-response.tsx │ │ │ ├── error-page.tsx │ │ │ ├── response-message.tsx │ │ │ ├── responses-table.tsx │ │ │ ├── user-requests-table.tsx │ │ │ ├── user-response-command-bar.tsx │ │ │ └── user-response.tsx │ │ ├── constants │ │ │ └── resources.ts │ │ ├── helpers │ │ │ ├── app-insights.ts │ │ │ └── resource-data.ts │ │ ├── index.tsx │ │ ├── react-app-env.d.ts │ │ ├── router │ │ │ └── router.tsx │ │ └── styles │ │ │ └── site.css │ ├── tsconfig.json │ └── tslint.json │ ├── Common │ ├── BackgroundService │ │ └── UserResponseDataRefreshService.cs │ ├── Constants.cs │ ├── Interfaces │ │ ├── ICompanyResponseSearchService.cs │ │ ├── ICompanyResponseStorageProvider.cs │ │ ├── ICompanyStorageHelper.cs │ │ ├── IConversationStorageProvider.cs │ │ ├── IMessagingExtensionHelper.cs │ │ ├── ITokenHelper.cs │ │ ├── IUserResponseSearchService.cs │ │ ├── IUserResponseStorageProvider.cs │ │ └── IUserStorageHelper.cs │ ├── Providers │ │ ├── BaseStorageProvider.cs │ │ ├── CompanyResponseStorageProvider.cs │ │ ├── ConversationStorageProvider.cs │ │ └── UserResponseStorageProvider.cs │ └── SearchServices │ │ ├── CompanyResponseSearchService.cs │ │ └── UserResponseSearchService.cs │ ├── Controllers │ ├── BaseCannedResponsesController.cs │ ├── BotController.cs │ ├── CompanyResponseController.cs │ ├── ResourceController.cs │ └── UserResponseController.cs │ ├── Helpers │ ├── AdaptiveCardHelper.cs │ ├── CompanyStorageHelper.cs │ ├── MessagingExtensionHelper.cs │ ├── TokenHelper.cs │ └── UserStorageHelper.cs │ ├── Microsoft.Teams.Apps.CannedResponses.csproj │ ├── Models │ ├── AddUserResponseRequestDetail.cs │ ├── Card │ │ └── AdaptiveSubmitActionData.cs │ ├── CompanyResponseEntity.cs │ ├── Configuration │ │ ├── BotSetting.cs │ │ ├── SearchServiceSetting.cs │ │ ├── StorageSetting.cs │ │ └── TelemetrySetting.cs │ ├── ConversationEntity.cs │ ├── ErrorResponse.cs │ ├── JwtClaims.cs │ ├── UserConversationState.cs │ └── UserResponseEntity.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Resources │ ├── Strings.Designer.cs │ ├── Strings.ar.resx │ ├── Strings.de.resx │ ├── Strings.es.resx │ ├── Strings.fr.resx │ ├── Strings.he.resx │ ├── Strings.ja.resx │ ├── Strings.ko.resx │ ├── Strings.pt-BR.resx │ ├── Strings.resx │ ├── Strings.ru.resx │ ├── Strings.zh-CN.resx │ └── Strings.zh-TW.resx │ ├── ServicesExtension.cs │ ├── Startup.cs │ ├── appsettings.json │ ├── stylecop.json │ └── wwwroot │ └── Artifacts │ └── appLogo.png ├── deploy.cmd └── global.json /.deployment: -------------------------------------------------------------------------------- 1 | [config] 2 | command = deploy.cmd 3 | -------------------------------------------------------------------------------- /Build/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "documentationRules": { 5 | "companyName": "Microsoft" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /Manifest/Admin/ar.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "مسؤول الردود السريعة", 4 | "name.full": "روبوت مسؤول الردود السريعة", 5 | "description.short": "روبوت مسؤول الاستجابة السريعة لمساعدتك في إدارة الردود المرسلة من المستخدم.", 6 | "description.full": "يقوم المستخدم المدار بإرسال ردود الشركة ويعمل بعد ذلك المسؤول على تعديل نص الردود وأوصافها وفئة الردود السريعة قبل الإرسال النهائي.", 7 | "bots[0].commandLists[0].commands[0].title": "القيام بجولة", 8 | "bots[0].commandLists[0].commands[0].description": "القيام بجولة" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/microsoft-teams-apps-quickresponses/a77f6de3cf33f2c59da9527069cf9eaee573e43d/Manifest/Admin/color.png -------------------------------------------------------------------------------- /Manifest/Admin/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Schnellantworten Administrator", 4 | "name.full": "Administrator-Bot für Schnellantworten", 5 | "description.short": "Admin-Bot für Schnellantworten zur Unterstützung bei Benutzerantworten.", 6 | "description.full": "Verwalten der vom Benutzer eingereichten Unternehmensantworten und Ändern der Schnellantwortkategorie, der Bezeichnung und des Antworttextes vor der endgültigen Übermittlung.", 7 | "bots[0].commandLists[0].commands[0].title": "Eine Tour machen", 8 | "bots[0].commandLists[0].commands[0].description": "Eine Tour machen" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Quick Responses Admin", 4 | "name.full": "Quick Responses Admin Bot", 5 | "description.short": "Quick Response admin bot to assist you in managing user submitted responses.", 6 | "description.full": "Managed user submitted company responses and modify quick response category, label and response text before final submission.", 7 | "bots[0].commandLists[0].commands[0].title": "Take a tour", 8 | "bots[0].commandLists[0].commands[0].description": "Take a tour" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Admin. de respuestas rápidas", 4 | "name.full": "Bot de administrador de respuestas rápidas", 5 | "description.short": "Un bot de respuestas rápidas para administrar respuestas enviadas por usuarios.", 6 | "description.full": "El usuario administrado envió respuestas de empresa enviadas y modifica una categoría de respuesta rápida, una etiqueta y un texto de respuesta antes de la entrega final.", 7 | "bots[0].commandLists[0].commands[0].title": "Visita guiada", 8 | "bots[0].commandLists[0].commands[0].description": "Visita guiada" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Gestion de réponses rapides", 4 | "name.full": "Chatbot d’administrateur de réponses rapides", 5 | "description.short": "Bot de gestion rapide de réponses aidant en gestion de réponses d’utilisateurs.", 6 | "description.full": "L’utilisateur géré a soumis des réponses à l’entreprise et a modifié la catégorie de réponse rapide, l’étiquette et le texte de la réponse avant l’envoi final.", 7 | "bots[0].commandLists[0].commands[0].title": "Suivez la visite guidée", 8 | "bots[0].commandLists[0].commands[0].description": "Suivez la visite guidée" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/he.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "מנהל מערכת של תגובות מהירות", 4 | "name.full": "בוט מנהל מערכת לתגובות מהירות", 5 | "description.short": "בוט מנהל מערכת של תגובה מהירה כדי לסייע לך בניהול תגובות שנשלחו על-ידי משתמשים.", 6 | "description.full": "ניהול תגובות חברה נשלחו על-ידי המשתמש ושינוי קטגוריית תגובה מהירה, תווית וטקסט תגובה לפני שליחה סופית.", 7 | "bots[0].commandLists[0].commands[0].title": "צא לסיור", 8 | "bots[0].commandLists[0].commands[0].description": "צא לסיור" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "クイック応答管理者", 4 | "name.full": "クイック応答管理者ボット", 5 | "description.short": "ユーザーが送信した応答を管理するためのクイック応答管理者用。", 6 | "description.full": "ユーザーが送信する会社の応答を管理し、最終的な送信前にクイック応答のカテゴリ、ラベル、応答テキストを変更します。", 7 | "bots[0].commandLists[0].commands[0].title": "ツアーを開始", 8 | "bots[0].commandLists[0].commands[0].description": "ツアーを開始" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/ko.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "빠른 응답 관리자", 4 | "name.full": "빠른 응답 관리자 봇", 5 | "description.short": "빠른 응답 관리 봇이 사용자가 제출한 응답을 관리할 수 있도록 지원합니다.", 6 | "description.full": "관리 사용자가 회사 응답을 제출하고 최종 제출 전에 빠른 응답 카테고리, 레이블 및 응답 텍스트를 수정합니다.", 7 | "bots[0].commandLists[0].commands[0].title": "둘러보기", 8 | "bots[0].commandLists[0].commands[0].description": "둘러보기" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "manifestVersion": "1.5", 4 | "version": "1.0.0", 5 | "id": "23e0f7b5-ffeb-4ce5-ac04-d7b6d7a4e605", 6 | "packageName": "com.microsoft.teams.apptemplates.quickresponsesadmin", 7 | "developer": { 8 | "name": "", 9 | "websiteUrl": "", 10 | "privacyUrl": "", 11 | "termsOfUseUrl": "" 12 | }, 13 | "localizationInfo": { 14 | "defaultLanguageTag": "en", 15 | "additionalLanguages": [ 16 | { 17 | "languageTag": "en", 18 | "file": "en.json" 19 | }, 20 | { 21 | "languageTag": "de", 22 | "file": "de.json" 23 | }, 24 | { 25 | "languageTag": "fr", 26 | "file": "fr.json" 27 | }, 28 | { 29 | "languageTag": "ar", 30 | "file": "ar.json" 31 | }, 32 | { 33 | "languageTag": "ja", 34 | "file": "ja.json" 35 | }, 36 | { 37 | "languageTag": "es", 38 | "file": "es.json" 39 | }, 40 | { 41 | "languageTag": "he", 42 | "file": "he.json" 43 | }, 44 | { 45 | "languageTag": "ko", 46 | "file": "ko.json" 47 | }, 48 | { 49 | "languageTag": "pt-BR", 50 | "file": "pt-BR.json" 51 | }, 52 | { 53 | "languageTag": "ru", 54 | "file": "ru.json" 55 | }, 56 | { 57 | "languageTag": "zh-CN", 58 | "file": "zh-CN.json" 59 | }, 60 | { 61 | "languageTag": "zh-TW", 62 | "file": "zh-TW.json" 63 | } 64 | ] 65 | }, 66 | "icons": { 67 | "color": "color.png", 68 | "outline": "outline.png" 69 | }, 70 | "name": { 71 | "short": "Quick Responses Admin", 72 | "full": "Quick Responses Admin Bot" 73 | }, 74 | "description": { 75 | "short": "Quick Response admin bot to assist you in managing user submitted responses.", 76 | "full": "Managed user submitted company responses and modify quick response category, label and response text before final submission." 77 | }, 78 | "accentColor": "#FFFFFF", 79 | "bots": [ 80 | { 81 | "botId": "<>", 82 | "scopes": [ 83 | "team" 84 | ], 85 | "commandLists": [ 86 | { 87 | "scopes": [ 88 | "team" 89 | ], 90 | "commands": [ 91 | { 92 | "title": "Take a tour", 93 | "description": "Take a tour" 94 | } 95 | ] 96 | } 97 | ], 98 | "supportsFiles": false, 99 | "isNotificationOnly": true 100 | } 101 | ], 102 | "permissions": [ 103 | "identity", 104 | "messageTeamMembers" 105 | ], 106 | "validDomains": [ 107 | "<>" 108 | ] 109 | } -------------------------------------------------------------------------------- /Manifest/Admin/outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/microsoft-teams-apps-quickresponses/a77f6de3cf33f2c59da9527069cf9eaee573e43d/Manifest/Admin/outline.png -------------------------------------------------------------------------------- /Manifest/Admin/pt-BR.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Admin. de Respostas Rápidas", 4 | "name.full": "Administrador Bot de Respostas Rápidas", 5 | "description.short": "Bot de admin. de Resposta Rápida para aux. no gerenc. de respostas de usuários.", 6 | "description.full": "Usuário gerenciado enviou respostas da empresa e modificará o texto da categoria, rótulo e resposta da resposta rápida antes do envio final.", 7 | "bots[0].commandLists[0].commands[0].title": "Faça um tour", 8 | "bots[0].commandLists[0].commands[0].description": "Faça um tour" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Администратор быстрых ответов", 4 | "name.full": "Бот администратора быстрых ответов", 5 | "description.short": "Бот администрирования быстрых ответов для управления ответами пользователей.", 6 | "description.full": "Управляйте ответами компании, отправленными пользователями, и изменяйте категорию быстрого ответа, подпись и текст ответа перед окончательной отправкой.", 7 | "bots[0].commandLists[0].commands[0].title": "Посмотреть обзор", 8 | "bots[0].commandLists[0].commands[0].description": "Посмотреть обзор" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/zh-CN.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "快速响应管理员", 4 | "name.full": "快速响应管理员机器人", 5 | "description.short": "快速响应管理机器人,可帮助您管理用户已提交的响应。", 6 | "description.full": "托管用户在最终提交前已提交公司响应并修改快速响应类别、标签和响应文本。", 7 | "bots[0].commandLists[0].commands[0].title": "浏览", 8 | "bots[0].commandLists[0].commands[0].description": "浏览" 9 | } -------------------------------------------------------------------------------- /Manifest/Admin/zh-TW.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "快速回應系統管理員", 4 | "name.full": "快速回應系統管理 Bot", 5 | "description.short": "快速回應系統管理 Bot 可協助您管理使用者提交的回應。", 6 | "description.full": "受管理使用者已提交公司回應,並修改快速回應類別、標籤與回應文字,然後再提交。", 7 | "bots[0].commandLists[0].commands[0].title": "導覽", 8 | "bots[0].commandLists[0].commands[0].description": "導覽" 9 | } -------------------------------------------------------------------------------- /Manifest/EndUser/ar.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "الردود السريعة", 4 | "name.full": "روبوت الردود السريعة", 5 | "description.short": "يمكنه تعيين ردود سريعة وإرسالها باستخدام امتداد المراسلة.", 6 | "description.full": "يمكنه إدارة ردودك السريعة ومشاركتها داخل فريق أو في دردشة شخصية من امتداد المراسلة.", 7 | "bots[0].commandLists[0].commands[0].title": "القيام بجولة", 8 | "bots[0].commandLists[0].commands[0].description": "القيام بجولة", 9 | "composeExtensions[0].commands[0].title": "ردودك", 10 | "composeExtensions[0].commands[0].description": "مشاركة ردودك السريعة", 11 | "composeExtensions[0].commands[0].parameters[0].title": "ردودك", 12 | "composeExtensions[0].commands[0].parameters[0].description": "إدخال كلمة أساسية أو فئة", 13 | "composeExtensions[0].commands[1].title": "ردود الشركة", 14 | "composeExtensions[0].commands[1].description": "مشاركة الردود السريعة للشركة", 15 | "composeExtensions[0].commands[0].parameters[0].title": "ردود الشركة", 16 | "composeExtensions[0].commands[1].parameters[0].description": "إدخال كلمة أساسية أو فئة", 17 | "composeExtensions[0].commands[2].title": "ردودك", 18 | "composeExtensions[0].commands[2].description": "إدارة ردودك السريعة", 19 | "composeExtensions[0].commands[0].parameters[0].title": "ردودك", 20 | "composeExtensions[0].commands[2].parameters[0].description": "إدارة ردودك السريعة", 21 | "composeExtensions[0].commands[3].title": "ردود الشركة", 22 | "composeExtensions[0].commands[3].description": "اقتراح ردود جديدة للشركة", 23 | "composeExtensions[0].commands[0].parameters[0].title": "ردود الشركة", 24 | "composeExtensions[0].commands[3].parameters[0].description": "اقتراح ردود جديدة للشركة" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/microsoft-teams-apps-quickresponses/a77f6de3cf33f2c59da9527069cf9eaee573e43d/Manifest/EndUser/color.png -------------------------------------------------------------------------------- /Manifest/EndUser/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Schnellantworten", 4 | "name.full": "Bot für Schnellantworten", 5 | "description.short": "Einrichten und Senden von Schnellantworten mit der Messaging-Erweiterung.", 6 | "description.full": "Verwalten Sie Ihre Schnellantworten und teilen Sie sie innerhalb eines Teams oder im persönlichen Chat über die Messaging-Erweiterung.", 7 | "bots[0].commandLists[0].commands[0].title": "Eine Tour machen", 8 | "bots[0].commandLists[0].commands[0].description": "Eine Tour machen", 9 | "composeExtensions[0].commands[0].title": "Ihre Antworten", 10 | "composeExtensions[0].commands[0].description": "Freigeben Ihrer Schnellantworten", 11 | "composeExtensions[0].commands[0].parameters[0].title": "Ihre Antworten", 12 | "composeExtensions[0].commands[0].parameters[0].description": "Schlüsselwort oder Kategorie eingeben", 13 | "composeExtensions[0].commands[1].title": "Unternehmensantworten", 14 | "composeExtensions[0].commands[1].description": "Freigeben der Unternehmensschnellantworten", 15 | "composeExtensions[0].commands[0].parameters[0].title": "Unternehmensantworten", 16 | "composeExtensions[0].commands[1].parameters[0].description": "Schlüsselwort oder Kategorie eingeben", 17 | "composeExtensions[0].commands[2].title": "Ihre Antworten", 18 | "composeExtensions[0].commands[2].description": "Verwalten Ihrer Schnellantworten", 19 | "composeExtensions[0].commands[0].parameters[0].title": "Ihre Antworten", 20 | "composeExtensions[0].commands[2].parameters[0].description": "Verwalten Ihrer Schnellantworten", 21 | "composeExtensions[0].commands[3].title": "Unternehmensantworten", 22 | "composeExtensions[0].commands[3].description": "Vorschlagen neuer Unternehmensantworten", 23 | "composeExtensions[0].commands[0].parameters[0].title": "Unternehmensantworten", 24 | "composeExtensions[0].commands[3].parameters[0].description": "Vorschlagen neuer Unternehmensantworten" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Quick Responses", 4 | "name.full": "Quick Responses Bot", 5 | "description.short": "Set up and send quick responses using messaging extension.", 6 | "description.full": "Manage your quick responses and share within a team or in personal chat from messaging extension.", 7 | "bots[0].commandLists[0].commands[0].title": "Take a tour", 8 | "bots[0].commandLists[0].commands[0].description": "Take a tour", 9 | "composeExtensions[0].commands[0].title": "Your responses", 10 | "composeExtensions[0].commands[0].description": "Share your quick responses", 11 | "composeExtensions[0].commands[0].parameters[0].title": "yourResponses", 12 | "composeExtensions[0].commands[0].parameters[0].description": "Enter a keyword or category", 13 | "composeExtensions[0].commands[1].title": "Company responses", 14 | "composeExtensions[0].commands[1].description": "Share company quick responses", 15 | "composeExtensions[0].commands[0].parameters[0].title": "companyResponses", 16 | "composeExtensions[0].commands[1].parameters[0].description": "Enter a keyword or category", 17 | "composeExtensions[0].commands[2].title": "Your responses", 18 | "composeExtensions[0].commands[2].description": "Manage your quick responses", 19 | "composeExtensions[0].commands[0].parameters[0].title": "yourResponses", 20 | "composeExtensions[0].commands[2].parameters[0].description": "Manage your quick responses", 21 | "composeExtensions[0].commands[3].title": "Company responses", 22 | "composeExtensions[0].commands[3].description": "Suggest new company responses", 23 | "composeExtensions[0].commands[0].parameters[0].title": "companyResponses", 24 | "composeExtensions[0].commands[3].parameters[0].description": "Suggest new company responses" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Respuestas rápidas", 4 | "name.full": "Bot de respuestas rápidas", 5 | "description.short": "Configure y envíe respuestas rápidas con la extensión de mensajería.", 6 | "description.full": "Administre sus respuestas rápidas y comparta dentro de un equipo o en un chat personal desde la extensión de mensajería.", 7 | "bots[0].commandLists[0].commands[0].title": "Visita guiada", 8 | "bots[0].commandLists[0].commands[0].description": "Visita guiada", 9 | "composeExtensions[0].commands[0].title": "Sus respuestas", 10 | "composeExtensions[0].commands[0].description": "Comparta sus respuestas rápidas", 11 | "composeExtensions[0].commands[0].parameters[0].title": "Sus respuestas", 12 | "composeExtensions[0].commands[0].parameters[0].description": "Comparta sus respuestas rápidas", 13 | "composeExtensions[0].commands[1].title": "Respuestas de la empresa", 14 | "composeExtensions[0].commands[1].description": "Compartir respuestas rápidas de la empresa", 15 | "composeExtensions[0].commands[0].parameters[0].title": "Respuestas de la empresa", 16 | "composeExtensions[0].commands[1].parameters[0].description": "Sugerir nuevas respuestas de la compañía", 17 | "composeExtensions[0].commands[2].title": "Sus respuestas", 18 | "composeExtensions[0].commands[2].description": "Administrar sus respuestas rápidas", 19 | "composeExtensions[0].commands[0].parameters[0].title": "Sus respuestas", 20 | "composeExtensions[0].commands[2].parameters[0].description": "Administrar sus respuestas rápidas", 21 | "composeExtensions[0].commands[3].title": "Respuestas de la empresa", 22 | "composeExtensions[0].commands[3].description": "Sugerir nuevas respuestas de la compañía", 23 | "composeExtensions[0].commands[0].parameters[0].title": "Respuestas de la empresa", 24 | "composeExtensions[0].commands[3].parameters[0].description": "Sugerir nuevas respuestas de la compañía" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Réponses rapides", 4 | "name.full": "Chatbot de réponses rapides", 5 | "description.short": "Configurez et envoyez des réponses rapides via l’extension de messagerie.", 6 | "description.full": "Gérez vos réponses rapides et partagez du contenu au sein d’une équipe ou dans une conversation personnelle à partir de l’extension de messagerie.", 7 | "bots[0].commandLists[0].commands[0].title": "Suivez la visite guidée", 8 | "bots[0].commandLists[0].commands[0].description": "Suivez la visite guidée", 9 | "composeExtensions[0].commands[0].title": "Vos réponses", 10 | "composeExtensions[0].commands[0].description": "Partagez vos réponses rapides", 11 | "composeExtensions[0].commands[0].parameters[0].title": "vosRéponses", 12 | "composeExtensions[0].commands[0].parameters[0].description": "Entrez un mot clé ou une catégorie", 13 | "composeExtensions[0].commands[1].title": "Réponses de l’entreprise", 14 | "composeExtensions[0].commands[1].description": "Partagez les réponses rapides de l’entreprise", 15 | "composeExtensions[0].commands[0].parameters[0].title": "réponsesEntreprise", 16 | "composeExtensions[0].commands[1].parameters[0].description": "Entrez un mot clé ou une catégorie", 17 | "composeExtensions[0].commands[2].title": "Vos réponses", 18 | "composeExtensions[0].commands[2].description": "Gérez vos réponses rapides", 19 | "composeExtensions[0].commands[0].parameters[0].title": "vosRéponses", 20 | "composeExtensions[0].commands[2].parameters[0].description": "Gérez vos réponses rapides", 21 | "composeExtensions[0].commands[3].title": "Réponses de l’entreprise", 22 | "composeExtensions[0].commands[3].description": "Suggérez de nouvelles réponses de l’entreprise", 23 | "composeExtensions[0].commands[0].parameters[0].title": "réponsesEntreprise", 24 | "composeExtensions[0].commands[3].parameters[0].description": "Suggérez de nouvelles réponses de l’entreprise" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/he.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "תגובות מהירות", 4 | "name.full": "בוט לתגובות מהירות", 5 | "description.short": "הגדרה ושליחה של תגובות מהירות באמצעות הרחבת העברת ההודעות.", 6 | "description.full": "נהל תגובות מהירות ושתף בתוך צוות או בצ'אט אישי מהרחבת העברת ההודעות.", 7 | "bots[0].commandLists[0].commands[0].title": "צא לסיור", 8 | "bots[0].commandLists[0].commands[0].description": "צא לסיור", 9 | "composeExtensions[0].commands[0].title": "התגובות שלך", 10 | "composeExtensions[0].commands[0].description": "שיתוף התגובות המהירות שלך", 11 | "composeExtensions[0].commands[0].parameters[0].title": "התגובות שלך", 12 | "composeExtensions[0].commands[0].parameters[0].description": "הזנת מילת מפתח או קטגוריה", 13 | "composeExtensions[0].commands[1].title": "תגובות חברה", 14 | "composeExtensions[0].commands[1].description": "שיתוף תגובות מהירות של חברה", 15 | "composeExtensions[0].commands[0].parameters[0].title": "תגובות חברה", 16 | "composeExtensions[0].commands[1].parameters[0].description": "הזנת מילת מפתח או קטגוריה", 17 | "composeExtensions[0].commands[2].title": "התגובות שלך", 18 | "composeExtensions[0].commands[2].description": "ניהול התגובות המהירות שלך", 19 | "composeExtensions[0].commands[0].parameters[0].title": "התגובות שלך", 20 | "composeExtensions[0].commands[2].parameters[0].description": "ניהול התגובות המהירות שלך", 21 | "composeExtensions[0].commands[3].title": "תגובות חברה", 22 | "composeExtensions[0].commands[3].description": "הצעת תגובות חדשות לחברה", 23 | "composeExtensions[0].commands[0].parameters[0].title": "תגובות חברה", 24 | "composeExtensions[0].commands[3].parameters[0].description": "הצעת תגובות חדשות לחברה" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "クイック応答", 4 | "name.full": "クイック応答ボット", 5 | "description.short": "メッセージングの拡張機能を使用して、クイック応答の設定と送信を行います。", 6 | "description.full": "メッセージングの拡張機能から、クイック応答を管理し、チーム内や個人的なチャット内で共有します。", 7 | "bots[0].commandLists[0].commands[0].title": "ツアーを開始", 8 | "bots[0].commandLists[0].commands[0].description": "ツアーを開始", 9 | "composeExtensions[0].commands[0].title": "あなたの応答", 10 | "composeExtensions[0].commands[0].description": "クイック応答を共有", 11 | "composeExtensions[0].commands[0].parameters[0].title": "あなたの応答", 12 | "composeExtensions[0].commands[0].parameters[0].description": "キーワードまたはカテゴリを入力", 13 | "composeExtensions[0].commands[1].title": "会社の応答", 14 | "composeExtensions[0].commands[1].description": "会社のクイック応答を共有", 15 | "composeExtensions[0].commands[0].parameters[0].title": "会社の応答", 16 | "composeExtensions[0].commands[1].parameters[0].description": "キーワードまたはカテゴリを入力", 17 | "composeExtensions[0].commands[2].title": "あなたの応答", 18 | "composeExtensions[0].commands[2].description": "クイック応答を管理", 19 | "composeExtensions[0].commands[0].parameters[0].title": "あなたの応答", 20 | "composeExtensions[0].commands[2].parameters[0].description": "クイック応答を管理", 21 | "composeExtensions[0].commands[3].title": "会社の応答", 22 | "composeExtensions[0].commands[3].description": "会社の新しい応答を提案", 23 | "composeExtensions[0].commands[0].parameters[0].title": "会社の応答", 24 | "composeExtensions[0].commands[3].parameters[0].description": "会社の新しい応答を提案" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/ko.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "빠른 응답", 4 | "name.full": "빠른 응답 봇", 5 | "description.short": "메시징 확장을 사용하여 빠른 응답을 설정하고 보냅니다.", 6 | "description.full": "팀 내의 빠른 응답을 관리하고 메시징 확장을 통해 공유할 수 있습니다.", 7 | "bots[0].commandLists[0].commands[0].title": "둘러보기", 8 | "bots[0].commandLists[0].commands[0].description": "둘러보기", 9 | "composeExtensions[0].commands[0].title": "내 응답", 10 | "composeExtensions[0].commands[0].description": "빠른 응답 공유", 11 | "composeExtensions[0].commands[0].parameters[0].title": "내 응답", 12 | "composeExtensions[0].commands[0].parameters[0].description": "키워드 또는 범주 입력", 13 | "composeExtensions[0].commands[1].title": "회사 응답", 14 | "composeExtensions[0].commands[1].description": "회사 빠른 응답 공유", 15 | "composeExtensions[0].commands[0].parameters[0].title": "회사 응답", 16 | "composeExtensions[0].commands[1].parameters[0].description": "키워드 또는 범주 입력", 17 | "composeExtensions[0].commands[2].title": "내 응답", 18 | "composeExtensions[0].commands[2].description": "빠른 응답 관리", 19 | "composeExtensions[0].commands[0].parameters[0].title": "내 응답", 20 | "composeExtensions[0].commands[2].parameters[0].description": "빠른 응답 관리", 21 | "composeExtensions[0].commands[3].title": "회사 응답", 22 | "composeExtensions[0].commands[3].description": "새 회사 응답 제안", 23 | "composeExtensions[0].commands[0].parameters[0].title": "회사 응답", 24 | "composeExtensions[0].commands[3].parameters[0].description": "새 회사 응답 제안" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "manifestVersion": "1.5", 4 | "version": "1.0.0", 5 | "id": "29fa40ad-9846-444f-b0df-eab818d8b70a", 6 | "packageName": "com.microsoft.teams.apptemplates.quickresponses", 7 | "developer": { 8 | "name": "", 9 | "websiteUrl": "", 10 | "privacyUrl": "", 11 | "termsOfUseUrl": "" 12 | }, 13 | "localizationInfo": { 14 | "defaultLanguageTag": "en", 15 | "additionalLanguages": [ 16 | { 17 | "languageTag": "en", 18 | "file": "en.json" 19 | }, 20 | { 21 | "languageTag": "de", 22 | "file": "de.json" 23 | }, 24 | { 25 | "languageTag": "fr", 26 | "file": "fr.json" 27 | }, 28 | { 29 | "languageTag": "ar", 30 | "file": "ar.json" 31 | }, 32 | { 33 | "languageTag": "ja", 34 | "file": "ja.json" 35 | }, 36 | { 37 | "languageTag": "es", 38 | "file": "es.json" 39 | }, 40 | { 41 | "languageTag": "he", 42 | "file": "he.json" 43 | }, 44 | { 45 | "languageTag": "ko", 46 | "file": "ko.json" 47 | }, 48 | { 49 | "languageTag": "pt-BR", 50 | "file": "pt-BR.json" 51 | }, 52 | { 53 | "languageTag": "ru", 54 | "file": "ru.json" 55 | }, 56 | { 57 | "languageTag": "zh-CN", 58 | "file": "zh-CN.json" 59 | }, 60 | { 61 | "languageTag": "zh-TW", 62 | "file": "zh-TW.json" 63 | } 64 | ] 65 | }, 66 | "icons": { 67 | "color": "color.png", 68 | "outline": "outline.png" 69 | }, 70 | "name": { 71 | "short": "Quick Responses", 72 | "full": "Quick Responses Bot" 73 | }, 74 | "description": { 75 | "short": "Set up and send quick responses using messaging extension.", 76 | "full": "Manage your quick responses and share within a team or in personal chat from messaging extension." 77 | }, 78 | "accentColor": "#FFFFFF", 79 | "bots": [ 80 | { 81 | "botId": "<>", 82 | "scopes": [ 83 | "personal" 84 | ], 85 | "commandLists": [ 86 | { 87 | "scopes": [ 88 | "personal" 89 | ], 90 | "commands": [ 91 | { 92 | "title": "Take a tour", 93 | "description": "Take a tour" 94 | } 95 | ] 96 | } 97 | ], 98 | "supportsFiles": false, 99 | "isNotificationOnly": true 100 | } 101 | ], 102 | "composeExtensions": [ 103 | { 104 | "botId": "<>", 105 | "canUpdateConfiguration": false, 106 | "commands": [ 107 | { 108 | "id": "yourResponses", 109 | "title": "Your responses", 110 | "description": "Share your quick responses", 111 | "initialRun": true, 112 | "parameters": [ 113 | { 114 | "name": "searchText", 115 | "title": "yourResponses", 116 | "description": "Enter a keyword or category" 117 | } 118 | ] 119 | }, 120 | { 121 | "id": "companyResponses", 122 | "title": "Company responses", 123 | "description": "Share company quick responses", 124 | "initialRun": true, 125 | "parameters": [ 126 | { 127 | "name": "searchText", 128 | "title": "companyResponses", 129 | "description": "Enter a keyword or category" 130 | } 131 | ] 132 | }, 133 | { 134 | "id": "YourResponses", 135 | "type": "action", 136 | "title": "Your responses", 137 | "description": "Manage your quick responses", 138 | "initialRun": true, 139 | "fetchTask": true, 140 | "context": [ 141 | "compose" 142 | ], 143 | "parameters": [ 144 | { 145 | "name": "yourResponses", 146 | "title": "yourResponses", 147 | "description": "Manage your quick responses" 148 | } 149 | ] 150 | }, 151 | { 152 | "id": "CompanyResponse", 153 | "type": "action", 154 | "title": "Company responses", 155 | "description": "Suggest new company responses", 156 | "initialRun": true, 157 | "fetchTask": true, 158 | "context": [ 159 | "compose" 160 | ], 161 | "parameters": [ 162 | { 163 | "name": "companyResponses", 164 | "title": "companyResponses", 165 | "description": "Suggest new company responses" 166 | } 167 | ] 168 | } 169 | ] 170 | } 171 | ], 172 | "permissions": [ 173 | "identity", 174 | "messageTeamMembers" 175 | ], 176 | "validDomains": [ 177 | "<>" 178 | ] 179 | } -------------------------------------------------------------------------------- /Manifest/EndUser/outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/microsoft-teams-apps-quickresponses/a77f6de3cf33f2c59da9527069cf9eaee573e43d/Manifest/EndUser/outline.png -------------------------------------------------------------------------------- /Manifest/EndUser/pt-BR.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Respostas Rápidas", 4 | "name.full": "Bot de Respostas Rápidas", 5 | "description.short": "Configure e envie respostas rápidas usando a extensão do sistema de mensagens.", 6 | "description.full": "Gerencie suas respostas rápidas e compartilhe em uma equipe ou em chat pessoal por meio da extensão do sistema de mensagens.", 7 | "bots[0].commandLists[0].commands[0].title": "Faça um tour", 8 | "bots[0].commandLists[0].commands[0].description": "Faça um tour", 9 | "composeExtensions[0].commands[0].title": "Suas respostas", 10 | "composeExtensions[0].commands[0].description": "Compartilhar suas respostas rápidas", 11 | "composeExtensions[0].commands[0].parameters[0].title": "suasRespostas", 12 | "composeExtensions[0].commands[0].parameters[0].description": "Inserir uma palavra-chave ou categoria", 13 | "composeExtensions[0].commands[1].title": "Respostas da empresa", 14 | "composeExtensions[0].commands[1].description": "Compartilhar respostas rápidas da empresa", 15 | "composeExtensions[0].commands[0].parameters[0].title": "respostasEmpresa", 16 | "composeExtensions[0].commands[1].parameters[0].description": "Inserir uma palavra-chave ou categoria", 17 | "composeExtensions[0].commands[2].title": "Suas respostas", 18 | "composeExtensions[0].commands[2].description": "Gerenciar suas respostas rápidas", 19 | "composeExtensions[0].commands[0].parameters[0].title": "suasRespostas", 20 | "composeExtensions[0].commands[2].parameters[0].description": "Gerenciar suas respostas rápidas", 21 | "composeExtensions[0].commands[3].title": "Respostas da empresa", 22 | "composeExtensions[0].commands[3].description": "Sugerir novas respostas da empresa", 23 | "composeExtensions[0].commands[0].parameters[0].title": "respostasEmpresa", 24 | "composeExtensions[0].commands[3].parameters[0].description": "Sugerir novas respostas da empresa" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "Быстрые ответы", 4 | "name.full": "Бот быстрых ответов", 5 | "description.short": "Настраивайте и отправляйте быстрые ответы с помощью расширения для сообщений.", 6 | "description.full": "Управляйте своими быстрыми ответами и делитесь ими с командой или в личном чате из расширения для сообщений.", 7 | "bots[0].commandLists[0].commands[0].title": "Посмотреть обзор", 8 | "bots[0].commandLists[0].commands[0].description": "Посмотреть обзор", 9 | "composeExtensions[0].commands[0].title": "Ваши ответы", 10 | "composeExtensions[0].commands[0].description": "Поделиться быстрыми ответами", 11 | "composeExtensions[0].commands[0].parameters[0].title": "Ваши ответы", 12 | "composeExtensions[0].commands[0].parameters[0].description": "Введите ключевое слово или категорию", 13 | "composeExtensions[0].commands[1].title": "Ответы компании", 14 | "composeExtensions[0].commands[1].description": "Поделиться быстрыми ответами компании", 15 | "composeExtensions[0].commands[0].parameters[0].title": "Ответы компании", 16 | "composeExtensions[0].commands[1].parameters[0].description": "Введите ключевое слово или категорию", 17 | "composeExtensions[0].commands[2].title": "Ваши ответы", 18 | "composeExtensions[0].commands[2].description": "Управление быстрыми ответами", 19 | "composeExtensions[0].commands[0].parameters[0].title": "Ваши ответы", 20 | "composeExtensions[0].commands[2].parameters[0].description": "Управление быстрыми ответами", 21 | "composeExtensions[0].commands[3].title": "Ответы компании", 22 | "composeExtensions[0].commands[3].description": "Предложить новые ответы компании", 23 | "composeExtensions[0].commands[0].parameters[0].title": "Ответы компании", 24 | "composeExtensions[0].commands[3].parameters[0].description": "Предложить новые ответы компании" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/zh-CN.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "快速响应", 4 | "name.full": "快速响应机器人", 5 | "description.short": "使用消息扩展设置并发送快速响应。", 6 | "description.full": "管理快速响应并在团队内或通过消息传递扩展在个人聊天中共享。", 7 | "bots[0].commandLists[0].commands[0].title": "浏览", 8 | "bots[0].commandLists[0].commands[0].description": "浏览", 9 | "composeExtensions[0].commands[0].title": "你的响应", 10 | "composeExtensions[0].commands[0].description": "共享快速响应", 11 | "composeExtensions[0].commands[0].parameters[0].title": "你的响应", 12 | "composeExtensions[0].commands[0].parameters[0].description": "输入关键字或类别", 13 | "composeExtensions[0].commands[1].title": "公司响应", 14 | "composeExtensions[0].commands[1].description": "共享公司快速响应", 15 | "composeExtensions[0].commands[0].parameters[0].title": "公司响应", 16 | "composeExtensions[0].commands[1].parameters[0].description": "输入关键字或类别", 17 | "composeExtensions[0].commands[2].title": "你的响应", 18 | "composeExtensions[0].commands[2].description": "管理快速响应", 19 | "composeExtensions[0].commands[0].parameters[0].title": "你的响应", 20 | "composeExtensions[0].commands[2].parameters[0].description": "管理快速响应", 21 | "composeExtensions[0].commands[3].title": "公司响应", 22 | "composeExtensions[0].commands[3].description": "建议新的公司响应", 23 | "composeExtensions[0].commands[0].parameters[0].title": "公司响应", 24 | "composeExtensions[0].commands[3].parameters[0].description": "建议新的公司响应" 25 | } -------------------------------------------------------------------------------- /Manifest/EndUser/zh-TW.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json", 3 | "name.short": "快速回應", 4 | "name.full": "快速回應 Bot", 5 | "description.short": "使用訊息擴充功能設定並傳送快速回應。", 6 | "description.full": "管理您的快速回應,並在團隊內或從傳訊擴充功能的個人交談中共用。", 7 | "bots[0].commandLists[0].commands[0].title": "導覽", 8 | "bots[0].commandLists[0].commands[0].description": "導覽", 9 | "composeExtensions[0].commands[0].title": "您的回應", 10 | "composeExtensions[0].commands[0].description": "共用您的快速回應", 11 | "composeExtensions[0].commands[0].parameters[0].title": "您的回應", 12 | "composeExtensions[0].commands[0].parameters[0].description": "輸入關鍵字或類別", 13 | "composeExtensions[0].commands[1].title": "公司回應", 14 | "composeExtensions[0].commands[1].description": "共用公司快速回應", 15 | "composeExtensions[0].commands[0].parameters[0].title": "公司回應", 16 | "composeExtensions[0].commands[1].parameters[0].description": "輸入關鍵字或類別", 17 | "composeExtensions[0].commands[2].title": "您的回應", 18 | "composeExtensions[0].commands[2].description": "管理您的快速回應", 19 | "composeExtensions[0].commands[0].parameters[0].title": "您的回應", 20 | "composeExtensions[0].commands[2].parameters[0].description": "管理您的快速回應", 21 | "composeExtensions[0].commands[3].title": "公司回應", 22 | "composeExtensions[0].commands[3].description": "建議新的公司回應", 23 | "composeExtensions[0].commands[0].parameters[0].title": "公司回應", 24 | "composeExtensions[0].commands[3].parameters[0].description": "建議新的公司回應" 25 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | languages: 4 | - csharp 5 | products: 6 | - office-teams 7 | description: Set up and send quick responses for frequent queries and discussions. 8 | urlFragment: microsoft-teams-apps-quickresponses 9 | --- 10 | 11 | # Quick Responses App Template 12 | 13 | | [Documentation](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/wiki/Home) | [Deployment guide](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/wiki/Deployment-Guide) | [Architecture](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/wiki/Solution-Overview) | 14 | | ---- | ---- | ---- | 15 | 16 | In fields such as technical support, quick responses to frequently asked questions is an effective solution for both the customer and technical professionals, as it offers the possibility of providing a quick answer to common questions while requiring little human intervention. 17 | 18 | In addition, sales representatives or technical support professionals send same or similar responses to questions asked by customers and users. However, time spent drafting these are not the best use of their time. Increase productivity and cut back on the amount of time spent writing and collating these responses by using Quick Responses app in Microsoft Teams. 19 | 20 | Using the Quick Responses app in Microsoft Teams, users can build their library of quick responses and use the Messaging Extension to search and insert the quick response in compose box saving time and effort. In addition, they can add a response to their existing list of saved responses using an existing chat conversation invoking the app through a Message Action. Users can also tap into a centrally published library of quick responses to stay current & accurate. 21 | 22 | ![Quick responses messaging extension search](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/wiki/Images/MessagingExtension.png) 23 | 24 | ![Quick responses your search task module](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/wiki/Images/YourResponsesTaskModule.png) 25 | 26 | ## Legal notice 27 | This app template is provided under the [MIT License](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/blob/master/LICENSE) terms. In addition to these terms, by using this app template you agree to the following: 28 | 29 | - You, not Microsoft, will license the use of your app to users or organization. 30 | 31 | - This app template is not intended to substitute your own regulatory due diligence or make you or your app compliant with respect to any applicable regulations, including but not limited to privacy, healthcare, employment, or financial regulations. 32 | 33 | - You are responsible for complying with all applicable privacy and security regulations including those related to use, collection and handling of any personal data by your app. This includes complying with all internal privacy and security policies of your organization if your app is developed to be sideloaded internally within your organization. Where applicable, you may be responsible for data related incidents or data subject requests for data collected through your app. 34 | 35 | - Any trademarks or registered trademarks of Microsoft in the United States and/or other countries and logos included in this repository are the property of Microsoft, and the license for this project does not grant you rights to use any Microsoft names, logos or trademarks outside of this repository. Microsoft’s general trademark guidelines can be found [here](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general.aspx). 36 | 37 | - If the app template enables access to any Microsoft Internet-based services (e.g., Office365), use of those services will be subject to the separately-provided terms of use. In such cases, Microsoft may collect telemetry data related to app template usage and operation. Use and handling of telemetry data will be performed in accordance with such terms of use. 38 | 39 | - Use of this template does not guarantee acceptance of your app to the Teams app store. To make this app available in the Teams app store, you will have to comply with the [submission and validation process](https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/appsource/publish), and all associated requirements such as including your own privacy statement and terms of use for your app. 40 | 41 | ## Getting started 42 | 43 | Begin with the [Solution overview](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/wiki/Solution-overview) to read about what the app does and how it works. 44 | 45 | When you're ready to try out Quick Responses, or to use it in your own organization, follow the steps in the [Deployment guide](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/wiki/DeployementGuide). 46 | 47 | ## Feedback 48 | 49 | Thoughts? Questions? Ideas? Share them with us on [Teams UserVoice](https://microsoftteams.uservoice.com/forums/555103-public)! 50 | 51 | Please report bugs and other code issues [here](https://github.com/OfficeDev/microsoft-teams-apps-quickresponses/issues/new) 52 | 53 | ## Contributing 54 | 55 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 56 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 57 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 58 | 59 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 60 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 61 | provided by the bot. You will only need to do this once across all repos using our CLA. 62 | 63 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 64 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 65 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 66 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). 40 | 41 | -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29613.14 5 | MinimumVisualStudioVersion = 15.0.26124.0 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Teams.Apps.CannedResponses", "Microsoft.Teams.Apps.CannedResponses\Microsoft.Teams.Apps.CannedResponses.csproj", "{C9724202-3D68-4421-AED3-F1D0083E6A7B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Debug|x64.ActiveCfg = Debug|Any CPU 21 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Debug|x64.Build.0 = Debug|Any CPU 22 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Debug|x86.ActiveCfg = Debug|Any CPU 23 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Debug|x86.Build.0 = Debug|Any CPU 24 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Release|x64.ActiveCfg = Release|Any CPU 27 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Release|x64.Build.0 = Release|Any CPU 28 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Release|x86.ActiveCfg = Release|Any CPU 29 | {C9724202-3D68-4421-AED3-F1D0083E6A7B}.Release|x86.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {F6C8B0E2-D8EA-40F5-A577-3DC19586CAEE} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/Bot/CannedResponsesActivityHandlerOptions.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | namespace Microsoft.Teams.Apps.CannedResponses.Bot 6 | { 7 | /// 8 | /// The CannedResponsesActivityHandlerOptions are the options for the bot. 9 | /// 10 | public sealed class CannedResponsesActivityHandlerOptions 11 | { 12 | /// 13 | /// Gets or sets a value indicating whether the response to a message should be in all uppercase. 14 | /// 15 | public bool UpperCaseResponse { get; set; } 16 | 17 | /// 18 | /// Gets or sets application base URL used to return success or failure task module result. 19 | /// 20 | public string AppBaseUri { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/Bot/CannedResponsesActivityMiddleWare.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | namespace Microsoft.Teams.Apps.CannedResponses.Bot 6 | { 7 | using System; 8 | using System.Threading; 9 | using System.Threading.Tasks; 10 | using Microsoft.ApplicationInsights.DataContracts; 11 | using Microsoft.Bot.Builder; 12 | using Microsoft.Bot.Schema; 13 | using Microsoft.Extensions.Logging; 14 | using Microsoft.Extensions.Options; 15 | using Microsoft.Teams.Apps.CannedResponses.Models; 16 | 17 | /// 18 | /// Represents middle ware that can operate on incoming activities. 19 | /// 20 | public class CannedResponsesActivityMiddleWare : IMiddleware 21 | { 22 | /// 23 | /// Represents unique id of a Tenant. 24 | /// 25 | private readonly string tenantId; 26 | 27 | /// 28 | /// Represents a set of key/value application configuration properties for Remote Support bot. 29 | /// 30 | private readonly IOptions options; 31 | 32 | /// 33 | /// Sends logs to the Application Insights service. 34 | /// 35 | private readonly ILogger logger; 36 | 37 | /// 38 | /// Initializes a new instance of the class. 39 | /// 40 | /// A set of key/value application configuration properties. 41 | /// Sends logs to the Application Insights service. 42 | public CannedResponsesActivityMiddleWare(IOptions options, ILogger logger) 43 | { 44 | this.options = options ?? throw new ArgumentNullException(nameof(options)); 45 | this.logger = logger; 46 | this.tenantId = this.options.Value.TenantId; 47 | } 48 | 49 | /// 50 | /// Processes an incoming activity in middleware. 51 | /// 52 | /// The context object for this turn. 53 | /// The delegate to call to continue the bot middleware pipeline. 54 | /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. 55 | /// A task that represents the work queued to execute. 56 | /// 57 | /// Middleware calls the next delegate to pass control to the next middleware in 58 | /// the pipeline. If middleware doesn’t call the next delegate, the adapter does 59 | /// not call any of the subsequent middleware’s request handlers or the bot’s receive 60 | /// handler, and the pipeline short circuits. 61 | /// The turnContext provides information about the incoming activity, and other data 62 | /// needed to process the activity. 63 | /// 64 | public async Task OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken = default) 65 | { 66 | if (turnContext != null && turnContext.Activity.Type != ActivityTypes.Event && !this.IsActivityFromExpectedTenant(turnContext)) 67 | { 68 | this.logger.LogInformation($"Unexpected tenant id {turnContext?.Activity.Conversation.TenantId}", SeverityLevel.Warning); 69 | } 70 | else 71 | { 72 | await next(cancellationToken); 73 | } 74 | } 75 | 76 | /// 77 | /// Verify if the tenant Id in the message is the same tenant Id used when application was configured. 78 | /// 79 | /// Context object containing information cached for a single turn of conversation with a user. 80 | /// True if context is from expected tenant else false. 81 | private bool IsActivityFromExpectedTenant(ITurnContext turnContext) 82 | { 83 | return turnContext.Activity.Conversation.TenantId == this.tenantId; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/Bot/CannedResponsesAdapterWithErrorHandler.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | namespace Microsoft.Teams.Apps.CannedResponses.Bot 6 | { 7 | using System; 8 | using Microsoft.Bot.Builder; 9 | using Microsoft.Bot.Builder.Integration.AspNet.Core; 10 | using Microsoft.Extensions.Configuration; 11 | using Microsoft.Extensions.Localization; 12 | using Microsoft.Extensions.Logging; 13 | using Microsoft.Teams.Apps.CannedResponses; 14 | 15 | /// 16 | /// Implements Error Handler. 17 | /// 18 | public class CannedResponsesAdapterWithErrorHandler : BotFrameworkHttpAdapter 19 | { 20 | /// 21 | /// Initializes a new instance of the class. 22 | /// 23 | /// Application configurations. 24 | /// Instance to send logs to the Application Insights service. 25 | /// Represents middle ware that can operate on incoming activities. 26 | /// The current cultures' string localizer. 27 | /// conversationState. 28 | public CannedResponsesAdapterWithErrorHandler( 29 | IConfiguration configuration, 30 | ILogger logger, 31 | CannedResponsesActivityMiddleWare cannedResponsesActivityMiddleWare, 32 | IStringLocalizer localizer, 33 | ConversationState conversationState = null) 34 | : base(configuration) 35 | { 36 | if (cannedResponsesActivityMiddleWare == null) 37 | { 38 | throw new NullReferenceException(nameof(cannedResponsesActivityMiddleWare)); 39 | } 40 | 41 | // Add activity middleware to the adapter's middleware pipeline 42 | this.Use(cannedResponsesActivityMiddleWare); 43 | 44 | this.OnTurnError = async (turnContext, exception) => 45 | { 46 | // Log any leaked exception from the application. 47 | logger.LogError(exception, $"Exception caught : {exception.Message}"); 48 | 49 | // Send a catch-all apology to the user. 50 | await turnContext.SendActivityAsync(localizer.GetString("ErrorMessage")); 51 | 52 | if (conversationState != null) 53 | { 54 | try 55 | { 56 | // Delete the conversationState for the current conversation to prevent the 57 | // bot from getting stuck in a error-loop caused by being in a bad state. 58 | // ConversationState should be thought of as similar to "cookie-state" in a Web pages. 59 | await conversationState.DeleteAsync(turnContext); 60 | } 61 | catch (Exception ex) 62 | { 63 | logger.LogError(ex, $"Exception caught on attempting to Delete ConversationState : {ex.Message}"); 64 | } 65 | } 66 | }; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/Bot/CannedResponsesLocalizationCultureProvider.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | namespace Microsoft.Teams.Apps.CannedResponses.Bot 6 | { 7 | using System; 8 | using System.IO; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | using Microsoft.AspNetCore.Http; 13 | using Microsoft.AspNetCore.Localization; 14 | using Microsoft.Bot.Schema; 15 | using Newtonsoft.Json; 16 | using Newtonsoft.Json.Linq; 17 | 18 | /// 19 | /// This class is responsible for implementing the for Bot Activities 20 | /// received from BotFramework. 21 | /// 22 | internal sealed class CannedResponsesLocalizationCultureProvider : IRequestCultureProvider 23 | { 24 | /// 25 | /// Get the culture of current request. 26 | /// 27 | /// The current HTTP request. 28 | /// A Task resolving to the culture info if found, null otherwise. 29 | #pragma warning disable UseAsyncSuffix // Interface method doesn't have Async suffix. 30 | public async Task DetermineProviderCultureResult(HttpContext httpContext) 31 | #pragma warning restore UseAsyncSuffix 32 | { 33 | if (httpContext?.Request?.Body?.CanRead != true) 34 | { 35 | return null; 36 | } 37 | 38 | string locale = string.Empty; 39 | var isBotFrameworkUserAgent = 40 | httpContext.Request.Headers["User-Agent"] 41 | .Any(userAgent => userAgent.Contains("Microsoft-BotFramework", StringComparison.OrdinalIgnoreCase)); 42 | 43 | if (!isBotFrameworkUserAgent) 44 | { 45 | locale = httpContext.Request.Headers["Accept-Language"].FirstOrDefault(); 46 | locale = locale?.Split(",")?.FirstOrDefault(); 47 | if (string.IsNullOrEmpty(locale)) 48 | { 49 | return null; 50 | } 51 | } 52 | 53 | try 54 | { 55 | if (isBotFrameworkUserAgent) 56 | { 57 | // Wrap the request stream so that we can rewind it back to the start for regular request processing. 58 | httpContext.Request.EnableBuffering(); 59 | 60 | // Read the request body, parse out the activity object, and set the parsed culture information. 61 | var streamReader = new StreamReader(httpContext.Request.Body, Encoding.UTF8, true, 1024, leaveOpen: true); 62 | using (var jsonReader = new JsonTextReader(streamReader)) 63 | { 64 | var obj = await JObject.LoadAsync(jsonReader); 65 | var activity = obj.ToObject(); 66 | 67 | var result = new ProviderCultureResult(activity.Locale); 68 | httpContext.Request.Body.Seek(0, SeekOrigin.Begin); 69 | return result; 70 | } 71 | } 72 | else 73 | { 74 | var result = new ProviderCultureResult(locale); 75 | return result; 76 | } 77 | } 78 | #pragma warning disable CA1031 // part of the middle ware pipeline, better to use default local then fail the request. 79 | catch (Exception) 80 | #pragma warning restore CA1031 81 | { 82 | return null; 83 | } 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quick-responses", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "@fluentui/react": "^0.43.2", 7 | "@microsoft/applicationinsights-react-js": "^2.3.1", 8 | "@microsoft/teams-js": "^1.5.2", 9 | "axios": "^0.19.0", 10 | "moment": "^2.24.0", 11 | "msteams-ui-icons-react": "^0.4.2", 12 | "node-sass": "^4.13.1", 13 | "react": "^16.12.0", 14 | "react-appinsights": "^3.0.0-rc.6", 15 | "react-dom": "^16.12.0", 16 | "react-router-dom": "^5.1.2", 17 | "react-scripts": "3.3.0", 18 | "typescript": "^3.7.4" 19 | }, 20 | "scripts": { 21 | "start": "react-scripts start", 22 | "build": "react-scripts build", 23 | "test": "react-scripts test", 24 | "eject": "react-scripts eject" 25 | }, 26 | "eslintConfig": { 27 | "extends": "react-app" 28 | }, 29 | "browserslist": { 30 | "production": [ 31 | ">0.2%", 32 | "not dead", 33 | "not op_mini all" 34 | ], 35 | "development": [ 36 | "last 1 chrome version", 37 | "last 1 firefox version", 38 | "last 1 safari version" 39 | ] 40 | }, 41 | "devDependencies": { 42 | "@testing-library/jest-dom": "^4.2.4", 43 | "@testing-library/react": "^9.4.0", 44 | "@testing-library/user-event": "^7.2.1", 45 | "@types/jest": "^24.0.24", 46 | "@types/node": "^12.12.21", 47 | "@types/react": "^16.9.17", 48 | "@types/react-dom": "^16.9.4", 49 | "@types/react-router-dom": "^4.3.3" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/public/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Canned responses 8 | 9 | 10 | 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/src/api/axios-decorator.ts: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | import axios, { AxiosResponse, AxiosRequestConfig } from "axios"; 6 | 7 | export class AxiosJWTDecorator { 8 | 9 | /** 10 | * Post data to API 11 | * @param {String} url Resource URI 12 | * @param {Object} data Request body data 13 | * @param {String} token Custom jwt token 14 | */ 15 | public async post>( 16 | url: string, 17 | data?: any, 18 | token?: string 19 | ): Promise { 20 | try { 21 | let config: AxiosRequestConfig = axios.defaults; 22 | config.headers["Authorization"] = `Bearer ${token}`; 23 | 24 | return await axios.post(url, data, config); 25 | } catch (error) { 26 | this.handleError(error); 27 | throw error; 28 | } 29 | } 30 | 31 | /** 32 | * Post data to API 33 | * @param {String} url Resource URI 34 | * @param {Object} data Request body data 35 | * @param {String} token Custom jwt token 36 | */ 37 | public async Put>( 38 | url: string, 39 | data?: any, 40 | token?: string 41 | ): Promise { 42 | try { 43 | let config: AxiosRequestConfig = axios.defaults; 44 | config.headers["Authorization"] = `Bearer ${token}`; 45 | 46 | return await axios.put(url, data, config); 47 | } catch (error) { 48 | this.handleError(error); 49 | throw error; 50 | } 51 | } 52 | 53 | /** 54 | * Get data to API 55 | * @param {String} token Custom jwt token 56 | */ 57 | public async get>( 58 | url: string, 59 | token?: string, 60 | locale?: string | null 61 | ): Promise { 62 | try { 63 | let config: AxiosRequestConfig = axios.defaults; 64 | config.headers["Authorization"] = `Bearer ${token}`; 65 | if (locale) { 66 | config.headers["Accept-Language"] = `${locale}`; 67 | } 68 | return await axios.get(url, config); 69 | } catch (error) { 70 | this.handleError(error); 71 | throw error; 72 | } 73 | } 74 | 75 | /** 76 | * Handle error occurred during API call. 77 | * @param {Object} error Error response object 78 | */ 79 | private handleError(error: any): void { 80 | if (error.hasOwnProperty("response")) { 81 | const errorStatus = error.response.status; 82 | if (errorStatus === 403) { 83 | window.location.href = "/errorpage/403"; 84 | } else if (errorStatus === 401) { 85 | window.location.href = "/errorpage/401"; 86 | } else { 87 | window.location.href = "/errorpage"; 88 | } 89 | } else { 90 | window.location.href = "/errorpage"; 91 | } 92 | } 93 | } 94 | 95 | const axiosJWTDecoratorInstance = new AxiosJWTDecorator(); 96 | export default axiosJWTDecoratorInstance; -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/src/api/company-responses-api.ts: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | import axios from "./axios-decorator"; 6 | 7 | const baseAxiosUrl = window.location.origin; 8 | 9 | /** 10 | * Get company responses data from API 11 | * @param {String | Null} token Custom jwt token 12 | */ 13 | export const getCompanyResponses = async (token: any): Promise => { 14 | 15 | let url = baseAxiosUrl + "/api/companyresponse/GetCompanyResponses"; 16 | return await axios.get(url, token); 17 | } 18 | 19 | /** 20 | * Get user requests data from API 21 | * @param {String | Null} token Custom jwt token 22 | */ 23 | export const getUserRequests = async (token: any): Promise => { 24 | 25 | let url = baseAxiosUrl + "/api/companyresponse/GetUserRequests"; 26 | return await axios.get(url, token); 27 | } 28 | 29 | /** 30 | * Delete user selected responses 31 | */ 32 | export const deleteUserResponseDetails = async (data: any[], token: any): Promise => { 33 | 34 | let url = baseAxiosUrl + "/api/userresponse/deleteuserresponses"; 35 | return await axios.post(url, data, token); 36 | } -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/src/api/resources-api.ts: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | import axios from "./axios-decorator"; 6 | 7 | const baseAxiosUrl = window.location.origin; 8 | 9 | /** 10 | * Get resource data from API 11 | * @param {String | Null} token Custom jwt token 12 | * @param {String | Null} locale Current user selected application locale 13 | */ 14 | export const getResourceStrings = async (token: any, locale?: string | null): Promise => { 15 | 16 | let url = baseAxiosUrl + "/api/Resource/ResourceStrings"; 17 | return await axios.get(url, token, locale); 18 | } 19 | 20 | /** 21 | * Get error resource data from API 22 | * @param {String | Null} token Custom jwt token 23 | * @param {String | Null} locale Current user selected application locale 24 | */ 25 | export const getErrorResourceStrings = async (token: any, locale?: string | null): Promise => { 26 | 27 | let url = baseAxiosUrl + "/api/Resource/ErrorResourceStrings"; 28 | return await axios.get(url, token, locale); 29 | } -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/src/api/user-responses-api.ts: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | import axios from "./axios-decorator"; 6 | 7 | const baseAxiosUrl = window.location.origin; 8 | 9 | /** 10 | * Get user responses data from API 11 | * @param {String} userId Unique user object identifier for which user responses will be fetched 12 | * @param {String | Null} token Custom JWT token 13 | */ 14 | export const getUserResponseDetails = async (userId: string | undefined, token: any): Promise => { 15 | 16 | let url = baseAxiosUrl + `/api/userresponse?id${userId}`; 17 | return await axios.get(url, token); 18 | } 19 | 20 | /** 21 | * Get user response details from API 22 | * @param {String | Null} responseId Unique response ID for which details will be fetched 23 | * @param {String | Null} token Custom JWT token 24 | */ 25 | export const getUserResponseDetailsForResponseId = async (responseId: string | null, token: any): Promise => { 26 | 27 | let url = baseAxiosUrl + `/api/userresponse/responsedata?responseId=${responseId}`; 28 | return await axios.get(url, token); 29 | } 30 | 31 | /** 32 | * Delete user selected responses 33 | * @param {Array} data Selected user responses which needs to be deleted 34 | * @param {String | Null} token Custom JWT token 35 | */ 36 | export const deleteUserResponseDetails = async (data: any[], token: any): Promise => { 37 | 38 | let url = baseAxiosUrl + "/api/userresponse/deleteresponses"; 39 | return await axios.post(url, data, token); 40 | } -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/src/app.tsx: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | import * as React from "react"; 6 | import { AppRoute } from "./router/router"; 7 | import Resources from "./constants/resources"; 8 | import { Provider, themes } from "@fluentui/react"; 9 | 10 | export interface IAppState { 11 | theme: string; 12 | } 13 | 14 | export default class App extends React.Component<{}, IAppState> { 15 | theme?: string | null; 16 | 17 | constructor(props: any) { 18 | super(props); 19 | let search = window.location.search; 20 | let params = new URLSearchParams(search); 21 | this.theme = params.get("theme"); 22 | 23 | this.state = { 24 | theme: this.theme ? this.theme : Resources.default, 25 | } 26 | } 27 | 28 | public setThemeComponent = () => { 29 | if (this.state.theme === "dark") { 30 | return ( 31 | 32 |
33 | {this.getAppDom()} 34 |
35 |
36 | ); 37 | } 38 | else if (this.state.theme === "contrast") { 39 | return ( 40 | 41 |
42 | {this.getAppDom()} 43 |
44 |
45 | ); 46 | } else { 47 | return ( 48 | 49 |
50 | {this.getAppDom()} 51 |
52 |
53 | ); 54 | } 55 | } 56 | 57 | public getAppDom = () => { 58 | return ( 59 |
60 | 61 |
); 62 | } 63 | 64 | /** 65 | * Renders the component 66 | */ 67 | public render(): JSX.Element { 68 | return ( 69 |
70 | {this.setThemeComponent()} 71 |
72 | ); 73 | } 74 | } -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/src/components/checkbox-base.tsx: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | import * as React from "react"; 6 | import { Checkbox } from "@fluentui/react"; 7 | 8 | interface ICheckboxState { 9 | isCheckboxChecked: boolean; 10 | } 11 | interface ICheckboxProps { 12 | value: string; 13 | onCheckboxChecked: (responseId: string, isChecked: boolean) => void; 14 | } 15 | 16 | export default class CheckboxBase extends React.Component { 17 | 18 | constructor(props: ICheckboxProps) { 19 | super(props); 20 | 21 | this.state = { 22 | isCheckboxChecked: false 23 | } 24 | } 25 | 26 | /** 27 | *Triggers when user checks/unchecks checkbox to set state 28 | */ 29 | onChange = (responseId: string, isChecked: boolean) => { 30 | this.setState({ isCheckboxChecked: isChecked }); 31 | this.props.onCheckboxChecked(responseId, isChecked); 32 | } 33 | 34 | /** 35 | * Renders the component 36 | */ 37 | public render(): JSX.Element { 38 | return ( 39 |
40 | this.onChange(this.props.value, !this.state.isCheckboxChecked)} /> 41 |
) 42 | } 43 | } -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/src/components/command-bar.tsx: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | import * as React from "react"; 6 | import { Button, Input, Dialog } from "@fluentui/react"; 7 | 8 | interface ICommandBarProps { 9 | isEditEnable: boolean; 10 | isDeleteEnable: boolean; 11 | onAddButtonClick: () => void; 12 | onEditButtonClick: () => void; 13 | onDeleteButtonClick: () => void; 14 | handleTableFilter: (searchText: string) => void; 15 | resoureStrings:any 16 | } 17 | 18 | interface ICommandbarState { 19 | searchValue: string 20 | } 21 | 22 | export default class CommandBar extends React.Component { 23 | 24 | constructor(props: ICommandBarProps) { 25 | super(props); 26 | this.state = { searchValue: "" }; 27 | this.handleChange = this.handleChange.bind(this); 28 | this.handleKeyPress = this.handleKeyPress.bind(this); 29 | } 30 | 31 | /** 32 | * Set State value of text box input control 33 | * @param {Any} event Event object 34 | */ 35 | handleChange(event: any) { 36 | this.setState({ searchValue: event.target.value }); 37 | if (event.target.value.length > 2 || event.target.value === "") { 38 | this.props.handleTableFilter(event.target.value); 39 | } 40 | } 41 | 42 | /** 43 | * Used to call parent search method on enter key press in text box 44 | * @param {Any} event Event object 45 | */ 46 | handleKeyPress(event: any) { 47 | var keyCode = event.which || event.keyCode; 48 | if (keyCode == 13) { 49 | if (event.target.value.length > 2 || event.target.value === "") { 50 | this.props.handleTableFilter(event.target.value); 51 | } 52 | } 53 | } 54 | 55 | /** 56 | * Renders the component 57 | */ 58 | public render(): JSX.Element { 59 | return ( 60 |
61 |
62 |
82 |
83 | ); 84 | } 85 | } -------------------------------------------------------------------------------- /Source/Microsoft.Teams.Apps.CannedResponses/ClientApp/src/components/company-responses-command-bar.tsx: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Microsoft. All rights reserved. 3 | // 4 | 5 | import * as React from "react"; 6 | import { Button, Input, Flex } from "@fluentui/react"; 7 | 8 | interface ICommandBarProps { 9 | showSuggestNewButton: boolean; 10 | onSuggestNewButtonClick: () => void; 11 | handleTableFilter: (searchText: string) => void; 12 | resourceStrings:any 13 | } 14 | 15 | interface ICommandbarState { 16 | searchValue: string 17 | } 18 | 19 | export default class CompanyResponsesCommandBar extends React.Component { 20 | 21 | constructor(props: ICommandBarProps) { 22 | super(props); 23 | this.state = { searchValue: "" }; 24 | this.handleChange = this.handleChange.bind(this); 25 | this.handleKeyPress = this.handleKeyPress.bind(this); 26 | } 27 | 28 | /** 29 | * Set State value of text box input control 30 | * @param {Any} event Event object 31 | */ 32 | handleChange(event: any) { 33 | this.setState({ searchValue: event.target.value }); 34 | if (event.target.value.length > 2 || event.target.value === "") { 35 | this.props.handleTableFilter(event.target.value); 36 | } 37 | } 38 | 39 | /** 40 | * Used to call parent search method on enter key press in text box 41 | * @param {Any} event Event object 42 | */ 43 | handleKeyPress(event: any) { 44 | var keyCode = event.which || event.keyCode; 45 | if (keyCode == 13) { 46 | if (event.target.value.length > 2 || event.target.value === "") { 47 | this.props.handleTableFilter(event.target.value); 48 | } 49 | } 50 | } 51 | 52 | /** 53 | * Renders the component 54 | */ 55 | public render(): JSX.Element { 56 | return ( 57 | 58 | {this.props.showSuggestNewButton === true &&