|
| 1 | +import symblAIApp from "../../symbl_ai.app.mjs"; |
| 2 | + |
| 3 | +export default { |
| 4 | + key: "symbl_ai-post-video-summary-ui", |
| 5 | + name: "Submit Video Summary User Interface", |
| 6 | + description: "The Video Summary UI provides users the ability to interact with the Symbl elements (Transcripts, Questions, Follow-Ups, Action Items, etc.) from a video conversation. See the doc [here](https://docs.symbl.ai/docs/api-reference/experience-api/post-video-summary-ui)", |
| 7 | + version: "0.0.1", |
| 8 | + type: "action", |
| 9 | + props: { |
| 10 | + symblAIApp, |
| 11 | + conversationId: { |
| 12 | + propDefinition: [ |
| 13 | + symblAIApp, |
| 14 | + "conversationId", |
| 15 | + ], |
| 16 | + }, |
| 17 | + videoUrl: { |
| 18 | + type: "string", |
| 19 | + label: "Video URL", |
| 20 | + description: "URL of the video file for which you want to generate the video summary UI.", |
| 21 | + }, |
| 22 | + logo: { |
| 23 | + type: "string", |
| 24 | + label: "Logo", |
| 25 | + description: "URL of the custom logo to be used in the Video Summary UI.", |
| 26 | + optional: true, |
| 27 | + }, |
| 28 | + favicon: { |
| 29 | + type: "string", |
| 30 | + label: "Favicon", |
| 31 | + description: "URL of the custom favicon to be used in the Video Summary UI.", |
| 32 | + optional: true, |
| 33 | + }, |
| 34 | + background: { |
| 35 | + type: "string", |
| 36 | + label: "Background Color", |
| 37 | + description: "Background color to be used in the Video Summary UI. Hex Color Codes accepted.", |
| 38 | + optional: true, |
| 39 | + }, |
| 40 | + topicsFilter: { |
| 41 | + type: "string", |
| 42 | + label: "Topics Filter Element Color", |
| 43 | + description: "Topics Filter Element color to be used in the Video Summary UI. Hex Color Codes accepted.", |
| 44 | + optional: true, |
| 45 | + }, |
| 46 | + insightsFilter: { |
| 47 | + type: "string", |
| 48 | + label: "Insights Element Color", |
| 49 | + description: "Insights (Questions, Follow-ups, Action Items, etc) Filter Element color to be used in the Video Summary UI. Hex Color Codes accepted.", |
| 50 | + optional: true, |
| 51 | + }, |
| 52 | + font: { |
| 53 | + type: "string", |
| 54 | + label: "Font", |
| 55 | + description: "The name of the font to be used in the Video Summary UI. All fonts available in the [Google Fonts](https://fonts.google.com/) are supported.", |
| 56 | + optional: true, |
| 57 | + }, |
| 58 | + summaryURLExpiresIn: { |
| 59 | + type: "string", |
| 60 | + label: "Expiration Time of the Video Summary UI", |
| 61 | + description: "Number of seconds set for expiration time of the Video Summary UI. Zero (0) will set the Video Summary UI to never expire. Default value is set to `2592000` (30 days).", |
| 62 | + optional: true, |
| 63 | + }, |
| 64 | + readOnly: { |
| 65 | + type: "boolean", |
| 66 | + label: "Read Only", |
| 67 | + description: "Disable the editing capabilities of the Video Summary UI. Default value is `false`.", |
| 68 | + optional: true, |
| 69 | + }, |
| 70 | + enableCustomDomain: { |
| 71 | + type: "boolean", |
| 72 | + label: "Enable Custom Domain", |
| 73 | + description: "Enable generation of personalized URLs for the Video Summary UI.", |
| 74 | + optional: true, |
| 75 | + }, |
| 76 | + }, |
| 77 | + async run({ $ }) { |
| 78 | + try { |
| 79 | + const response = |
| 80 | + await this.symblAIApp.postVideoSummaryUI({ |
| 81 | + $, |
| 82 | + conversationId: this.conversationId, |
| 83 | + data: { |
| 84 | + videoUrl: this.videoUrl, |
| 85 | + name: "video-summary", |
| 86 | + logo: this.logo, |
| 87 | + favicon: this.favicon, |
| 88 | + color: { |
| 89 | + background: this.background, |
| 90 | + topicsFilter: this.topicsFilter, |
| 91 | + insightsFilter: this.insightsFilter, |
| 92 | + }, |
| 93 | + font: { |
| 94 | + family: this.font, |
| 95 | + }, |
| 96 | + summaryURLExpiresIn: this.summaryURLExpiresIn, |
| 97 | + readOnly: this.readOnly, |
| 98 | + enableCustomDomain: this.enableCustomDomain, |
| 99 | + }, |
| 100 | + }); |
| 101 | + $.export("$summary", `Successfully generated Video Summary UI at: ${response.url}`); |
| 102 | + return response; |
| 103 | + } catch (error) { |
| 104 | + console.log("Error: ", error); |
| 105 | + $.export("summary", "Failed to post Video Summary UI."); |
| 106 | + } |
| 107 | + }, |
| 108 | +}; |
0 commit comments