n8n-nodes-linq 0.1.1 → 0.1.2

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 (2) hide show
  1. package/README.md +182 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,182 @@
1
+ # n8n-nodes-linq
2
+
3
+ Linq Partner API (v2) community node for n8n. This node lets you manage chats, messages, phone numbers, webhooks, and contacts in Linq from your n8n workflows.
4
+
5
+ - Package: `n8n-nodes-linq`
6
+ - Node icon: included (SVG)
7
+ - API version: v2
8
+ - Auth: Integration Token (`X-LINQ-INTEGRATION-TOKEN`)
9
+
10
+ ## Installation (in n8n)
11
+
12
+ - Using the n8n UI:
13
+ 1) Settings → Community Nodes → Install
14
+ 2) Enter: `n8n-nodes-linq`
15
+ 3) Restart n8n if prompted
16
+
17
+ - Headless / environment variable:
18
+ - Add `n8n-nodes-linq` to `N8N_COMMUNITY_PACKAGES` (or install with npm in your instance) and restart n8n.
19
+
20
+ ## Credentials
21
+
22
+ Create a new credential of type “Linq API” and set your Integration Token:
23
+
24
+ - Header used: `X-LINQ-INTEGRATION-TOKEN: <your token>`
25
+ - The field is hidden in the UI (password type).
26
+
27
+ Where it’s defined:
28
+ - [class LinqApi implements ICredentialType](credentials/LinqApi.credentials.ts:1)
29
+
30
+ ## Node usage
31
+
32
+ Add the “Linq” node to your workflow. The node provides Resources and Operations that map 1:1 to the documented Linq Partner API endpoints.
33
+
34
+ - Node implementation:
35
+ - [class Linq implements INodeType](nodes/Linq/Linq.node.ts:1)
36
+ - Icon is configured at the node-level: `icon: 'file:linq.svg'`
37
+ - SVG file: [linq.svg](nodes/Linq/linq.svg:1)
38
+
39
+ ### Supported resources and operations
40
+
41
+ The node implements all endpoints from your Linq Partner API documentation (v2):
42
+
43
+ - Resource: Chat
44
+ - Operations:
45
+ - Get Many → GET `/chats` (with pagination, optional `phone_number`)
46
+ - Get One → GET `/chats/:id`
47
+ - Find → GET `/chats/find` (by `phone_number`)
48
+ - Create → POST `/chats` (supports group chats via `phone_numbers[]`, and optional `send_from`, and initial `message.text`)
49
+ - Share Contact → POST `/chats/share-contact` (feature must be enabled by Linq)
50
+
51
+ - Resource: Chat Message
52
+ - Operations:
53
+ - Get Many → GET `/chat_messages?chat_id=:chatId`
54
+ - Get One → GET `/chat_messages/:id`
55
+ - Create → POST `/chat_messages` (`chat_id`, `text`)
56
+ - Delete → DELETE `/chat_messages/:id`
57
+ - Edit → POST `/chat_messages/:id/edit` (`text`)
58
+ - React → POST `/chat_messages/:id/react` (`reaction`)
59
+ - Get Reaction → GET `/chat_messages/:id/reaction`
60
+
61
+ - Resource: Phone Number
62
+ - Operations:
63
+ - Get Many → GET `/phone_numbers`
64
+ - Check iMessage Availability → POST `/i_message_availability/check` (`phone_number`)
65
+
66
+ - Resource: Webhook Subscription
67
+ - Operations:
68
+ - Get Many → GET `/webhook_subscriptions`
69
+ - Get One → GET `/webhook_subscriptions/:id`
70
+ - Create → POST `/webhook_subscriptions` (`webhook_url`, `events[]`, `version`, `active`)
71
+ - Update → PUT `/webhook_subscriptions/:id` (update any subset of: `webhook_url`, `events[]`, `version`, `active`)
72
+ - Delete → DELETE `/webhook_subscriptions/:id`
73
+
74
+ - Resource: Contact
75
+ - Operations:
76
+ - Create → POST `/contacts` (`contact{ first_name, last_name, email, phone_number, company, title, location }`)
77
+ - Get One → GET `/contacts/:id`
78
+ - Update → PUT `/contacts/:id` (any subset of contact fields)
79
+ - Delete → DELETE `/contacts/:id`
80
+
81
+ ### Common parameters
82
+
83
+ - Pagination (chats): `page`, `perPage`
84
+ - Filtering (chats, find): `phoneNumber`
85
+ - IDs: `chatId`, `chatMessageId`, `contactId`, `webhookSubscriptionId`
86
+
87
+ ## Examples
88
+
89
+ 1) Create a chat and send an initial message
90
+ - Resource: Chat
91
+ - Operation: Create
92
+ - Fields:
93
+ - Send From (optional): `+13175551234`
94
+ - Display Name (optional): `Project A`
95
+ - Phone Numbers: `+13341234567, +13347654321`
96
+ - Message Text: `Hello from n8n!`
97
+
98
+ 2) Check iMessage availability
99
+ - Resource: Phone Number
100
+ - Operation: Check iMessage Availability
101
+ - Field:
102
+ - Phone Number: `+13341234567`
103
+
104
+ 3) Create a contact
105
+ - Resource: Contact
106
+ - Operation: Create
107
+ - Fields:
108
+ - First Name: `John`
109
+ - Last Name: `Doe`
110
+ - Email: `john@example.com`
111
+ - Phone Number: `+15551234567`
112
+
113
+ 4) Manage webhook subscriptions
114
+ - Resource: Webhook Subscription
115
+ - Operation: Create
116
+ - Fields:
117
+ - Webhook URL: `https://example.com/webhooks/linq`
118
+ - Events: `message.sent, message.received, contact.created`
119
+ - Version: `2`
120
+ - Active: `true`
121
+
122
+ ## Development
123
+
124
+ Requirements:
125
+ - Node.js ≥ 20
126
+ - npm or pnpm (npm commands shown below)
127
+ - n8n local instance if testing end-to-end
128
+
129
+ Install and build:
130
+ ```bash
131
+ cd n8n-nodes-linq
132
+ npm install
133
+ npm run build
134
+ npm run lint
135
+ ```
136
+
137
+ Local link for testing in a local n8n:
138
+ ```bash
139
+ # in this folder
140
+ npm link
141
+ # in your n8n folder
142
+ npm link n8n-nodes-linq
143
+ # restart n8n, then add “Linq” node
144
+ ```
145
+
146
+ Project files of interest:
147
+ - Node: [Linq.node.ts](nodes/Linq/Linq.node.ts:1)
148
+ - Credentials: [LinqApi.credentials.ts](credentials/LinqApi.credentials.ts:1)
149
+ - Gulp (copies icons): [gulpfile.js](gulpfile.js:1)
150
+ - TypeScript config: [tsconfig.json](tsconfig.json:1)
151
+ - Index shim: [index.js](index.js:1)
152
+
153
+ ## Publishing to npm
154
+
155
+ 1) Ensure metadata is correct in [package.json](package.json:1)
156
+ - name: `n8n-nodes-linq`
157
+ - version: increment for each release, e.g. `0.1.0`
158
+ - author: `"alexautomates"`
159
+ - keywords include: `n8n-community-node-package`
160
+ - `files: ["dist"]` to publish only built files
161
+ - `n8n` block lists built nodes and credentials in `dist/`
162
+
163
+ 2) Build and publish:
164
+ ```bash
165
+ npm run build
166
+ npm publish --access public
167
+ ```
168
+
169
+ 3) Users can install from the n8n UI (Community Nodes) by typing `n8n-nodes-linq`.
170
+
171
+ ## Icon / Branding
172
+
173
+ - Icon file is included at: [nodes/Linq/linq.svg](nodes/Linq/linq.svg:1)
174
+ - Node description references it as `icon: 'file:linq.svg'`, so it renders in the n8n UI.
175
+
176
+ ## License
177
+
178
+ MIT — see [LICENSE.md](LICENSE.md:1)
179
+
180
+ ## Support
181
+
182
+ Issues and suggestions are welcome. Please open an issue in your repository once you push the source (see `repository` field in [package.json](package.json:1)).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-linq",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Linq API integration for n8n",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",