n8n-nodes-shortio 0.1.0 → 1.0.0

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.
Files changed (34) hide show
  1. package/README.md +104 -32
  2. package/dist/credentials/ShortioApi.credentials.js +4 -1
  3. package/dist/credentials/ShortioApi.credentials.js.map +1 -1
  4. package/dist/nodes/Shortio/Descriptions/LinkDescription.d.ts +1 -1
  5. package/dist/nodes/Shortio/Descriptions/LinkDescription.js +83 -121
  6. package/dist/nodes/Shortio/Descriptions/LinkDescription.js.map +1 -1
  7. package/dist/nodes/Shortio/Descriptions/LinkDescriptionV2.d.ts +3 -0
  8. package/dist/nodes/Shortio/Descriptions/LinkDescriptionV2.js +749 -0
  9. package/dist/nodes/Shortio/Descriptions/LinkDescriptionV2.js.map +1 -0
  10. package/dist/nodes/Shortio/Descriptions/StatisticsDescription.d.ts +3 -0
  11. package/dist/nodes/Shortio/Descriptions/StatisticsDescription.js +237 -0
  12. package/dist/nodes/Shortio/Descriptions/StatisticsDescription.js.map +1 -0
  13. package/dist/nodes/Shortio/GenericFunctions.d.ts +5 -1
  14. package/dist/nodes/Shortio/GenericFunctions.js +32 -4
  15. package/dist/nodes/Shortio/GenericFunctions.js.map +1 -1
  16. package/dist/nodes/Shortio/Interfaces.d.ts +46 -28
  17. package/dist/nodes/Shortio/Resources.js +0 -4
  18. package/dist/nodes/Shortio/Resources.js.map +1 -1
  19. package/dist/nodes/Shortio/Shortio.node.d.ts +3 -4
  20. package/dist/nodes/Shortio/Shortio.node.js +12 -309
  21. package/dist/nodes/Shortio/Shortio.node.js.map +1 -1
  22. package/dist/nodes/Shortio/Shortio.node.json +5 -4
  23. package/dist/nodes/Shortio/oldVersionNotice.d.ts +2 -0
  24. package/dist/nodes/Shortio/oldVersionNotice.js +10 -0
  25. package/dist/nodes/Shortio/oldVersionNotice.js.map +1 -0
  26. package/dist/nodes/Shortio/v1/ShortioV1.node.d.ts +6 -0
  27. package/dist/nodes/Shortio/v1/ShortioV1.node.js +325 -0
  28. package/dist/nodes/Shortio/v1/ShortioV1.node.js.map +1 -0
  29. package/dist/nodes/Shortio/v2/ShortioV2.node.d.ts +11 -0
  30. package/dist/nodes/Shortio/v2/ShortioV2.node.js +480 -0
  31. package/dist/nodes/Shortio/v2/ShortioV2.node.js.map +1 -0
  32. package/dist/package.json +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +52 -52
package/README.md CHANGED
@@ -1,78 +1,150 @@
1
1
  # Table of Contents
2
+
2
3
  - [Table of Contents](#table-of-contents)
3
4
  - [Overview of Community Short.io n8n Node](#overview-of-community-shortio-n8n-node)
4
- - [If you want a custom node](#if-you-want-a-custom-node)
5
5
  - [Bugs/Contributing/Feature Request](#bugscontributingfeature-request)
6
6
  - [Documentation](#documentation)
7
- - [Installation](#installation)
8
- - [Credentials](#credentials)
9
- - [Links](#links)
10
- - [List Links](#list-links)
11
- - [Get Link Info](#get-link-info)
12
- - [Create Link](#create-link)
13
- - [Update Existing Link](#update-existing-link)
14
- - [Delete Link](#delete-link)
7
+ - [Installation](#installation)
8
+ - [Credentials](#credentials)
9
+ - [Links](#links)
10
+ - [List Links](#list-links)
11
+ - [Get Link Info](#get-link-info)
12
+ - [Create Link](#create-link)
13
+ - [Update Existing Link](#update-existing-link)
14
+ - [Delete Link](#delete-link)
15
+ - [Generate QR For Link](#generate-qr-for-link)
16
+ - [Statistics](#statistics)
17
+ - [Get Link Statistics](#get-link-statistics)
18
+ - [Get Domain Statistics](#get-domain-statistics)
15
19
 
16
20
  # Overview of Community Short.io n8n Node
17
- I have no affiliation with short.io beyond being a user.
18
-
19
- I created this node for use within my company as well as for our clients. I left out a few features, but I included the options for them so people can see what is possible. Feel free to submit a PR with the updated functionality, or get in touch to discuss us completing it.
20
21
 
21
- # If you want a custom node
22
- Please reach out to me using the info on [my GitHub page](https://github.com/liamdmcgarrigle). \
23
- Nodes can be built for the community as well as privately just for one organization.
22
+ I have no affiliation with short.io beyond being a user. I work for n8n but this is not an official node.
24
23
 
25
24
  # Bugs/Contributing/Feature Request
26
25
 
27
26
  If you have a bug to report or a feature request, please [submit a GitHub issue](https://github.com/liamdmcgarrigle/n8n-nodes-shortio/issues/new) with as much detail as you're able to give.
28
27
 
29
- Feel free to submit PRs, but please get in touch with me first to make sure I am willing to add the feature before you spend the time on it.
30
-
31
28
  # Documentation
32
29
 
33
30
  ## Installation
34
31
 
35
- This can only be installed if you are self-hosting n8n.
32
+ This is now available on cloud as a verified community node. Simply search for shortio in the node panel.
36
33
 
37
- Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
34
+ Or follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
38
35
 
39
36
  ## Credentials
40
37
 
41
38
  To use this node you will need to set up short.io credentials with a key from short.io. You also will need an account and may need a paid account.
42
39
 
43
40
  1. Go to https://app.short.io/settings/integrations/api-key and click on "Create API Key"
44
- ![Screenshot1](/readme_files/step-1.jpeg)
41
+ ![Screenshot1](/readme_files/step-1.jpeg)
45
42
 
46
43
  2. Add a description, pick the domain to use, and press "Create"
47
- ![Screenshot2](/readme_files/step-2.jpeg)
44
+ ![Screenshot2](/readme_files/step-2.jpeg)
48
45
 
49
46
  3. Copy your new token. It will only be shown once
50
47
 
51
48
  4. Go to the credential page in n8n, in add credentials add "Short.io API", then paste in your token. Then add the domain you chose in the previous step and press save
52
- ![Screenshot3](/readme_files/step-3.png)
49
+ ![Screenshot3](/readme_files/step-3.png)
53
50
 
54
51
  ## Links
55
52
 
56
53
  ### List Links
57
- Get a list of your short links. These will only be links from the domain in your credential.
58
54
 
59
- You will need to choose how many results are returned. Anything over 150 is automatically paginationed.
55
+ Get a list of your short links. These will only be links from the domain in your credential.
56
+
57
+ You will need to choose how many results are returned. Anything over 150 is automatically paginationed.
60
58
 
61
59
  You can filter the results by adding:
62
- Before date: returns links before the listed date
63
- After date: returns links after the listed date
64
- Date Sort Order: changes the order the links are in based on the date
60
+
61
+ - **Before date**: returns links before the listed date
62
+ - **After date**: returns links after the listed date
63
+ - **Date Sort Order**: changes the order the links are in based on the date
65
64
 
66
65
  ### Get Link Info
67
- Get link details from the domain in your credential and the path.
68
66
 
67
+ Get link details from the domain in your credential and the path.
69
68
 
70
69
  ### Create Link
71
- Create a link. There are many options. Please see the descriptions I added to n8n's interface.
70
+
71
+ Create a link. There are many options available in the additional fields:
72
+
73
+ - **Path**: Custom path for the short link
74
+ - **Folder**: Assign the link to a folder (select from list or enter folder ID)
75
+ - **Allow Duplicates**: Allow multiple links with the same original URL
76
+ - **Title**: Title shown in the short.io admin panel
77
+ - **Expiration settings**: Set expiry date and redirect URL for expired links
78
+ - **Device-specific URLs**: Separate URLs for iPhone and Android users
79
+ - **Cloaking**: Hide the original URL in the browser address bar
80
+ - **Redirect Type**: Choose HTTP redirect code (301, 302, etc.)
81
+ - **Password**: Password-protect the link (requires Personal plan)
82
+ - **UTM Parameters**: Add tracking parameters (source, medium, campaign, term, content)
83
+ - **Tags**: Add tags to organize your links
72
84
 
73
85
  ### Update Existing Link
74
- You can update an existing short link by using the path or the link `idString`.
75
- You can change anything about the link including the full long URL.
86
+
87
+ You can update an existing short link by using the path or the link `idString`.
88
+ You can change anything about the link including the full long URL and folder assignment.
76
89
 
77
90
  ### Delete Link
78
- You can delete an existing short link by using the path or the link `idString`.
91
+
92
+ You can delete an existing short link by using the path or the link `idString`.
93
+
94
+ ### Generate QR For Link
95
+
96
+ Generate a QR code image for any short link. You can identify the link by path or `idString`.
97
+
98
+ Options available:
99
+
100
+ - **Color**: QR code foreground color
101
+ - **Background Color**: QR code background color
102
+ - **Size**: QR code size (1-99)
103
+ - **Type**: Image format (PNG or SVG)
104
+
105
+ The operation returns binary data that can be used with other n8n nodes (e.g., save to file, send via email, upload to cloud storage).
106
+
107
+ ## Statistics
108
+
109
+ Get detailed analytics for your links and domain.
110
+
111
+ ### Get Link Statistics
112
+
113
+ Get detailed statistics for a specific link. Identify the link by path or `idString`.
114
+
115
+ **Period options:**
116
+
117
+ - Today
118
+ - Yesterday
119
+ - Last 7 Days
120
+ - Last 30 Days
121
+ - Last Month
122
+ - All Time
123
+ - Custom (specify start and end dates)
124
+
125
+ **Additional options:**
126
+
127
+ - **Clicks Chart Interval**: Data granularity for the clicks chart (hour, day, week, month)
128
+ - **Skip Top Records**: Skip top records like referer, browser, and country breakdowns
129
+
130
+ Returns detailed statistics including total clicks, human clicks, click trends, and breakdowns by referer, browser, country, and more.
131
+
132
+ ### Get Domain Statistics
133
+
134
+ Get detailed statistics for your entire domain (as configured in your credentials).
135
+
136
+ **Period options:**
137
+
138
+ - Today
139
+ - Yesterday
140
+ - Last 7 Days
141
+ - Last 30 Days
142
+ - Last Month
143
+ - All Time
144
+ - Custom (specify start and end dates)
145
+
146
+ **Additional options:**
147
+
148
+ - **Clicks Chart Interval**: Data granularity for the clicks chart (hour, day, week, month)
149
+
150
+ Returns domain-wide statistics including total clicks, link counts, clicks per link averages, and breakdowns by referer, browser, country, and more.
@@ -14,13 +14,16 @@ class ShortioApi {
14
14
  typeOptions: {
15
15
  password: true,
16
16
  },
17
+ required: true,
17
18
  default: '',
18
19
  },
19
20
  {
20
21
  displayName: 'Domain',
21
22
  name: 'domain',
22
23
  type: 'string',
23
- default: 'urlLikeThis.com',
24
+ default: '',
25
+ required: true,
26
+ placeholder: 'urlLikeThis.com',
24
27
  description: 'URL without https://, www., or any trailing /'
25
28
  },
26
29
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"ShortioApi.credentials.js","sourceRoot":"","sources":["../../credentials/ShortioApi.credentials.ts"],"names":[],"mappings":";;;AAMA,MAAa,UAAU;IAAvB;QACC,SAAI,GAAG,YAAY,CAAC;QAEpB,gBAAW,GAAG,cAAc,CAAC;QAE7B,gBAAW,GAAG,IAAI,CAAC;QAEnB,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,+CAA+C;aAC5D;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,eAAe,EAAE,yBAAyB;iBAC1C;aACD;SACD,CAAC;IAEH,CAAC;CAAA;AAnCD,gCAmCC"}
1
+ {"version":3,"file":"ShortioApi.credentials.js","sourceRoot":"","sources":["../../credentials/ShortioApi.credentials.ts"],"names":[],"mappings":";;;AAMA,MAAa,UAAU;IAAvB;QACC,SAAI,GAAG,YAAY,CAAC;QAEpB,gBAAW,GAAG,cAAc,CAAC;QAE7B,gBAAW,GAAG,IAAI,CAAC;QAEnB,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iBAAiB;gBAC9B,WAAW,EAAE,+CAA+C;aAC5D;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,eAAe,EAAE,yBAAyB;iBAC1C;aACD;SACD,CAAC;IAEH,CAAC;CAAA;AAtCD,gCAsCC"}
@@ -1,3 +1,3 @@
1
- import { INodeProperties } from "n8n-workflow";
1
+ import { INodeProperties } from 'n8n-workflow';
2
2
  export declare const linkOperations: INodeProperties[];
3
3
  export declare const linkFields: INodeProperties[];