directus-extension-texttoanything 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js ADDED
@@ -0,0 +1 @@
1
+ import{defineOperationApp as e}from"@directus/extensions-sdk";const t=[],a=[],o=[],i=[],n=[],d=[e({id:"ttabarcode",name:"TTA generate barcode",icon:"box",description:"Generate a barcode trough Text to anything!",overview:({barcodeContent:e})=>[{label:"barcode content",text:e}],options:[{field:"RapidAPI token",name:"RapidAPI token",type:"string",meta:{width:"full",interface:"input"}},{field:"barcodeContent",name:"content",type:"string",meta:{width:"full",interface:"input"}},{field:"barcodeType",name:"type",type:"dropdown",meta:{interface:"select-dropdown",options:{choices:["auspost","azteccode","azteccodecompact","aztecrune","bc412","channelcode","codablockf","code11","code128","code16k","code2of5","code32","code39","code39ext","code49","code93","code93ext","codeone","coop2of5","daft","databarexpanded","databarexpandedcomposite","databarexpandedstacked","databarexpandedstackedcomposite","databarlimited","databarlimitedcomposite","databaromni","databaromnicomposite","databarstacked","databarstackedcomposite","databarstackedomni","databarstackedomnicomposite","databartruncated","databartruncatedcomposite","datalogic2of5","datamatrix","datamatrixrectangular","datamatrixrectangularextension","dotcode","ean13","ean13composite","ean14","ean2","ean5","ean8","ean8composite","flattermarken","gs1-128","gs1-128composite","gs1-cc","gs1datamatrix","gs1datamatrixrectangular","gs1dldatamatrix","gs1dlqrcode","gs1dotcode","gs1northamericancoupon","gs1qrcode","hanxin","hibcazteccode","hibccodablockf","hibccode128","hibccode39","hibcdatamatrix","hibcdatamatrixrectangular","hibcmicropdf417","hibcpdf417","hibcqrcode","iata2of5","identcode","industrial2of5","interleaved2of5","isbn","ismn","issn","itf14","japanpost","kix","leitcode","mailmark","mands","matrix2of5","maxicode","micropdf417","microqrcode","msi","onecode","pdf417","pdf417compact","pharmacode","pharmacode2","planet","plessey","posicode","postnet","pzn","qrcode","rationalizedCodabar","raw","rectangularmicroqrcode","royalmail","sscc18","swissqrcode","symbol","telepen","telepennumeric","ultracode","upca","upcacomposite","upce","upcecomposite"].map((e=>({text:e,value:e})))}}},{field:"scale",name:"scale",type:"number",meta:{width:"full",interface:"input"}},{field:"height",name:"height",type:"number",meta:{width:"full",interface:"input"}},{field:"includetext",name:"include text",type:"boolean",meta:{width:"full",interface:"boolean"}}]}),e({id:"ttapdf",name:"TTA generate PDF",icon:"box",description:"Generate a PDF trough Text to anything!",overview:({filename:e})=>[{label:"File name",text:e}],options:[{field:"RapidAPI token",name:"RapidAPI token",type:"string",meta:{width:"full",interface:"input"}},{field:"filename",name:"File name",type:"string",meta:{width:"full",interface:"input"}},{field:"pdfoptions",name:"Options",type:"json",meta:{width:"full",interface:"input-code",options:{language:"json",placeholder:JSON.stringify({html:"<h1>Hello world!</h1>"},null,2),template:JSON.stringify({html:"<h1>Hello world!</h1>"},null,2)}}}]}),e({id:"ttaqrcode",name:"TTA generate QRcode",icon:"box",description:"Generate a QRcode trough Text to anything!",overview:({qrcodeContent:e})=>[{label:"QRCode content",text:e}],options:[{field:"RapidAPI token",name:"RapidAPI token",type:"string",meta:{width:"full",interface:"input"}},{field:"qrcodeContent",name:"QRCode content",type:"string",meta:{width:"full",interface:"input"}}]})];export{a as displays,t as interfaces,o as layouts,i as modules,d as operations,n as panels};
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "directus-extension-texttoanything",
3
+ "version": "0.0.1",
4
+ "keywords": [
5
+ "directus",
6
+ "directus-extension",
7
+ "directus-custom-bundle"
8
+ ],
9
+ "directus:extension": {
10
+ "type": "bundle",
11
+ "path": {
12
+ "app": "dist/app.js",
13
+ "api": "dist/api.js"
14
+ },
15
+ "entries": [
16
+ {
17
+ "type": "operation",
18
+ "name": "GenerateBarcode",
19
+ "source": {
20
+ "app": "GenerateBarcode/src/app.ts",
21
+ "api": "GenerateBarcode/src/api.ts"
22
+ }
23
+ },
24
+ {
25
+ "type": "operation",
26
+ "name": "GeneratePDF",
27
+ "source": {
28
+ "app": "GeneratePDF/src/app.ts",
29
+ "api": "GeneratePDF/src/api.ts"
30
+ }
31
+ },
32
+ {
33
+ "type": "operation",
34
+ "name": "GenerateQRCode",
35
+ "source": {
36
+ "app": "GenerateQRCode/src/app.ts",
37
+ "api": "GenerateQRCode/src/api.ts"
38
+ }
39
+ }
40
+ ],
41
+ "host": "^9.22.1"
42
+ },
43
+ "scripts": {
44
+ "build": "directus-extension build",
45
+ "dev": "directus-extension build -w --no-minify"
46
+ },
47
+ "devDependencies": {
48
+ "@directus/extensions-sdk": "9.22.1"
49
+ }
50
+ }
package/readme.md ADDED
@@ -0,0 +1,41 @@
1
+ # directus-extension-texttoanything
2
+
3
+ > **Currently in Beta** please report any issues you encounter
4
+
5
+ ## Introduction
6
+
7
+ Do you want to create PDFs, barcodes, and QR codes within Directus?
8
+ This extension bundle offers the required operations to achieve that!
9
+
10
+ ## Setup
11
+
12
+ To install the package, use either npm or yarn:
13
+
14
+ ```sh
15
+ npm i directus-extension-texttoanything
16
+ ```
17
+
18
+ or
19
+
20
+ ```sh
21
+ yarn add directus-extension-texttoanything
22
+ ```
23
+
24
+ ### API
25
+
26
+ The API is a requirement for the extension in order to eliminate dependencies specific to the operating system. Get the necessary API token at https://rapidapi.com/Attacler/api/text-to-anything. The extension will not function without it, but there is a free tier available for testing.
27
+
28
+ Restart your Directus instance to complete the setup.
29
+
30
+ ## Supported Features
31
+
32
+ The package currently supports the following operations:
33
+
34
+ - Create a PDF based on the provided HTML
35
+ - Create a QRCode
36
+ - Create a Barcode
37
+
38
+ The actions work trough flow operations and will upload the PDF/QRCode/Barcode directly into Directus.
39
+ The operation will return the Directus file id which you can use to link the file to a record.
40
+
41
+ If there are any questions or bugs, please create an issue.