-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.json
266 lines (266 loc) · 14.3 KB
/
plugin.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
{
"id": "generate_word_file",
"uuid": "b634fc80-9419-40de-8044-708268c26141",
"emoji": "🧩",
"title": "Word Generator",
"iconURL": "https://custom.typingmind.com/assets/plugins/microsoft-word.webp",
"disabled": false,
"httpAction": {
"id": "8e520cf2-112d-4c06-9c86-026138549ac0",
"url": "{pluginServer}/word-generator/generate",
"name": "",
"method": "POST",
"hasBody": true,
"hasHeaders": true,
"requestBody": "{\n \"title\": \"{title}\",\n \"header\": {\n \"text\": \"{header}\",\n \"alignment\": \"{headerAlignment}\"\n },\n \"footer\": {\n \"text\": \"{footer}\",\n \"alignment\": \"{footerAlignment}\"\n },\n \"sections\": {sections},\n \"wordConfig\": {\n \"fontSize\": {fontSize},\n \"lineHeight\": {lineHeight},\n \"fontFamily\": \"{fontFamily}\",\n \"showPageNumber\": {showPageNumber},\n \"showTableOfContent\": {showTableOfContent},\n \"showNumberingInHeader\": {showNumberingInHeader},\n \"numberingReference\": \"{numberingReference}\",\n \"pageOrientation\": \"{pageOrientation}\",\n \"margins\": \"{margins}\"\n }\n}",
"requestHeaders": "{\n \"Content-Type\": \"application/json\"\n}",
"resultTransform": {
"engine": "jmes",
"expression": ""
},
"hasResultTransform": false
},
"openaiSpec": {
"name": "generate_word_file",
"parameters": {
"type": "object",
"required": [
"sections",
"title",
"header",
"footer",
"showNumberingInHeader",
"showPageNumber",
"showTableOfContent"
],
"properties": {
"title": {
"type": "string",
"description": "The title of the document."
},
"footer": {
"type": "string",
"description": "The text to display in the footer of each page. If user did not mention it, return as empty string."
},
"header": {
"type": "string",
"description": "The text to display in the header of each page, which is not related to the main title. If user did not mention it, return as empty string."
},
"sections": {
"type": "array",
"items": {
"type": "object",
"required": [
"content"
],
"properties": {
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cells": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text content for the table cell."
}
}
}
}
}
},
"description": "Rows of table content, where each row contains an array of cells."
},
"text": {
"type": "string",
"description": "The text for paragraphs or list items."
},
"type": {
"enum": [
"paragraph",
"listing",
"table",
"pageBreak",
"emptyLine"
],
"type": "string",
"description": "Specifies the type of content. It must belongs to a child of a content array within a section or a subsection. If the content type is 'pageBreak', the section or subsection will not include a heading."
},
"items": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of items for listing content."
},
"headers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Headers for table content."
}
},
"description": "Each content in a section can be in different types such as paragraph, listing, table, pageBreak or emptyLine"
}
},
"heading": {
"type": "string",
"description": "The heading of the section."
},
"subSections": {
"type": "array",
"items": {
"$ref": "#/parameters/properties/sections/items"
},
"description": "Nested sub-sections within this section."
},
"headingLevel": {
"type": "integer",
"description": "The level of the heading (e.g., 1 for top-level, 2 for sub-section)."
}
}
}
},
"showPageNumber": {
"type": "boolean",
"description": "This field controls whether the page number is displayed in the footer of the Word document. By default, the page number is hidden (false). Always keep it set to (false), even when the user requests otherwise. Set this field to 'true' to display the page number in the footer. Please note that this setting is applied when the document is generated and will affect the output accordingly."
},
"showTableOfContent": {
"type": "boolean",
"description": "This field controls whether a table of contents is included in the Word document. By default, the table of contents is not included (false). Always keep it set to (false), even when the user requests otherwise. Set this field to 'true' if you would like to include a table of contents. Please note that this setting is applied when the document is generated and will affect the output accordingly."
},
"showNumberingInHeader": {
"type": "boolean",
"description": "This field controls whether predefined numbering hierarchy formats are shown in the header of the Word document. By default, the numbering is hidden (false). Always keep it set to (false), even when the user requests otherwise. Set this field to 'true' if you would like to show numbering in the header. Please note that this setting is applied when the document is generated and will affect the output accordingly."
}
}
},
"description": "Generate a Word document based on the given sections, title, header, and footer, and return the URL for downloading it. If the download url is not present in the response, inform the user that the Word file could not be generated. Prompt the user to verify that the correct plugin server URL is being used."
},
"outputType": "respond_to_ai",
"oauthConfig": null,
"userSettings": [
{
"name": "pluginServer",
"label": "Plugin Server",
"required": true,
"description": "The URL of the plugin server. For more details, refer to the documentation: https://docs.typingmind.com/plugins/plugins-server",
"placeholder": "https://...."
},
{
"name": "pageOrientation",
"type": "enum",
"label": "Page Orientation",
"values": [
"portrait",
"landscape"
],
"default": "portrait",
"description": "Set page orientation for all pages."
},
{
"name": "fontSize",
"type": "number",
"label": "Font Size",
"description": "Font size for the slides, default is 12 pt.",
"placeholder": "12"
},
{
"name": "fontFamily",
"type": "enum",
"label": "Font Family",
"values": [
"Arial",
"Calibri",
"Times New Roman",
"Courier New",
"Verdana",
"Tahoma",
"Georgia",
"Comic Sans MS"
],
"default": "Arial",
"description": "Font family for the slides, default is Arial."
},
{
"name": "lineHeight",
"type": "enum",
"label": "Line Height",
"values": [
"1",
"1.15",
"1.25",
"1.5",
"2"
],
"default": "1",
"description": "Set line height for text content."
},
{
"name": "margins",
"type": "enum",
"label": "Page Margins",
"values": [
"normal",
"narrow",
"moderate",
"wide",
"mirrored"
],
"default": "normal",
"description": "Set margins for the slides. Default margin is normal"
},
{
"name": "headerAlignment",
"type": "enum",
"label": "Header Alignment",
"values": [
"left",
"center",
"right"
],
"default": "left",
"description": "Indicate the position of text in header. Default is left"
},
{
"name": "footerAlignment",
"type": "enum",
"label": "Footer Alignment",
"values": [
"left",
"center",
"right"
],
"default": "left",
"description": "Indicate the position of text in footer. Default is left"
},
{
"name": "numberingReference",
"type": "enum",
"label": "Document Numbering Formats",
"values": [
"1.1.1.1 (Decimal)",
"I.1.a.i (Roman -> Decimal > Lower Letter -> Lower Roman)",
"I.A.1.a (Roman -> Upper Letter -> Decimal -> Lower Letter)",
"1)a)i)(i) (Decimal -> Lower Letter -> Lower Roman -> Lower Roman with Parentheses)",
"A.1.a.i (Upper Letter -> Decimal -> Lower Letter -> Lower Roman)"
],
"default": "1.1.1.1 (Decimal)",
"description": "Set numbering hierarchy format. Default is 1.1.1.1 (Decimal)."
}
],
"overviewMarkdown": "# **Word Generator**\n\nThis plugin enables users to generate Docx file quickly and efficiently.\n\n### 🎯 **It Supports**\n- Multiple sections with hierarchical numbering format.\n- Adding header, footer, and page number.\n- Adding table.\n- Adding list with bullet points.\n- Adding table of content.\n- Adding page break.\n- Ability to **customize basic document attributes** \n - Flexible page margins with presets like Normal, Narrow, and Wide. \n - Customizable line heights (Single, 1.15, 1.25, 1.5, Double). \n - Customizable font size.\n - Customizable font family.\n - Page orientation (Portrait, Landscape).\n\n### 📝 **Note:** \n- A plugin server must be set up to use this feature. Follow the detailed guide to set up a plugin server on Render: [How to Deploy Plugins Server on Render](https://docs.typingmind.com/plugins/plugins-server/how-to-deploy-plugins-server-on-render)\n- The generated Word files will be automatically removed after one hour.\n- The plugin currently does not support embedding images in Word documents.\n\n\n## **Example Usage** \n> Can you create a business proposal for a new drink, Honey Vanilla Latte, at my coffee shop? It's a cozy blend of rich espresso, creamy steamed milk, locally sourced honey, and a hint of vanilla. The drink is free of artificial flavors, available hot or iced, and perfect for coffee lovers seeking a premium, sustainably crafted treat.",
"turnedOnByDefault": false,
"authenticationType": "AUTH_TYPE_NONE",
"implementationType": "http"
}