n8n-nodes-tiendanube 0.1.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.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Sergio Keberlein
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,199 @@
1
+ # n8n-nodes-tiendanube
2
+
3
+ This is an n8n community node that lets you use Tiendanube/Nuvemshop in your n8n workflows.
4
+
5
+ Tiendanube (also known as Nuvemshop in Brazil) is a leading e-commerce platform in Latin America that allows you to create and manage online stores.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8
+
9
+ ## Installation
10
+
11
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
12
+
13
+ ### Community Node Installation
14
+
15
+ 1. Go to **Settings > Community Nodes** in n8n
16
+ 2. Select **Install**
17
+ 3. Enter `n8n-nodes-tiendanube` in **Enter npm package name**
18
+ 4. Agree to the risks and click **Install**
19
+
20
+ ### Manual Installation
21
+
22
+ To install manually, navigate to your n8n installation and run:
23
+
24
+ ```bash
25
+ npm install n8n-nodes-tiendanube
26
+ ```
27
+
28
+ For docker installations, add the following line before the n8n starts:
29
+
30
+ ```bash
31
+ docker exec -it -u node <container-name> npm install n8n-nodes-tiendanube
32
+ ```
33
+
34
+ ## Configuration
35
+
36
+ ### Getting Tiendanube Credentials
37
+
38
+ 1. Log in to your Tiendanube admin panel
39
+ 2. Go to **Apps** section
40
+ 3. Create a new app or use an existing one
41
+ 4. Get your **Store ID** (numeric ID visible in your store URL)
42
+ 5. Get your **Access Token** from the app credentials
43
+
44
+ ### Setting up Credentials in n8n
45
+
46
+ 1. In n8n, go to **Credentials** → **New**
47
+ 2. Search for **Tiendanube API**
48
+ 3. Enter your **Store ID**
49
+ 4. Enter your **Access Token**
50
+ 5. Click **Save**
51
+
52
+ ## Operations
53
+
54
+ ### Products
55
+
56
+ #### Get
57
+ Retrieve a single product by ID.
58
+
59
+ **Parameters:**
60
+ - `Product ID` (required): The ID of the product to retrieve
61
+
62
+ #### Get Many
63
+ Retrieve multiple products with filtering and pagination.
64
+
65
+ **Parameters:**
66
+ - `Return All`: Whether to return all results or limit them
67
+ - `Limit`: Maximum number of results to return (1-200)
68
+ - **Additional Fields:**
69
+ - `Published`: Filter by published status
70
+ - `Free Shipping`: Filter by free shipping
71
+ - `Category ID`: Filter by category
72
+ - `Search Query`: Search by name or description
73
+ - `Sort By`: Sort results by created-at, updated-at, name, or price (ascending/descending)
74
+
75
+ #### Create
76
+ Create a new product.
77
+
78
+ **Parameters:**
79
+ - `Name` (required): Product name
80
+ - **Additional Fields:**
81
+ - `Description`: Product description
82
+ - `Price`: Product price
83
+ - `Promotional Price`: Sale price
84
+ - `Cost Price`: Cost of the product
85
+ - `SKU`: Stock keeping unit
86
+ - `Stock`: Available quantity
87
+ - `Published`: Whether the product is visible
88
+ - `Free Shipping`: Whether shipping is free
89
+ - `Weight`, `Width`, `Height`, `Depth`: Physical dimensions
90
+ - `Brand`: Product brand
91
+ - `Categories (JSON)`: Array of category objects
92
+ - `Images (JSON)`: Array of image objects
93
+ - `Variants (JSON)`: Array of variant objects
94
+
95
+ **Example Categories JSON:**
96
+ ```json
97
+ [
98
+ {"id": 123},
99
+ {"id": 456}
100
+ ]
101
+ ```
102
+
103
+ **Example Images JSON:**
104
+ ```json
105
+ [
106
+ {"src": "https://example.com/image1.jpg"},
107
+ {"src": "https://example.com/image2.jpg"}
108
+ ]
109
+ ```
110
+
111
+ #### Update
112
+ Update an existing product.
113
+
114
+ **Parameters:**
115
+ - `Product ID` (required): The ID of the product to update
116
+ - `Update Fields`: Any fields you want to modify (same as Create operation)
117
+
118
+ #### Delete
119
+ Delete a product by ID.
120
+
121
+ **Parameters:**
122
+ - `Product ID` (required): The ID of the product to delete
123
+
124
+ ## Multilingual Support
125
+
126
+ Tiendanube supports multiple languages. You can provide text fields in two ways:
127
+
128
+ 1. **Simple text** (defaults to Spanish):
129
+ ```
130
+ Mi Producto
131
+ ```
132
+
133
+ 2. **JSON format** (multiple languages):
134
+ ```json
135
+ {
136
+ "es": "Mi Producto",
137
+ "en": "My Product",
138
+ "pt": "Meu Produto"
139
+ }
140
+ ```
141
+
142
+ This applies to fields like `name` and `description`.
143
+
144
+ ## Compatibility
145
+
146
+ - Minimum n8n version: 1.0.0
147
+ - Tested against: Tiendanube API v1
148
+
149
+ ## Resources
150
+
151
+ - [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
152
+ - [Tiendanube API documentation](https://tiendanube.github.io/api-documentation/intro)
153
+
154
+ ## Development
155
+
156
+ ### Building the Package
157
+
158
+ ```bash
159
+ # Install dependencies
160
+ npm install
161
+
162
+ # Build the package
163
+ npm run build
164
+
165
+ # Link for local testing
166
+ npm link
167
+ ```
168
+
169
+ In your n8n installation directory:
170
+ ```bash
171
+ npm link n8n-nodes-tiendanube
172
+ ```
173
+
174
+ ### Project Structure
175
+
176
+ ```
177
+ n8n-nodes-tiendanube/
178
+ ├── credentials/
179
+ │ └── TiendanubeApi.credentials.ts
180
+ ├── nodes/
181
+ │ └── Tiendanube/
182
+ │ ├── Tiendanube.node.ts
183
+ │ └── tiendanube.svg
184
+ ├── package.json
185
+ ├── tsconfig.json
186
+ └── gulpfile.js
187
+ ```
188
+
189
+ ## License
190
+
191
+ [MIT](LICENSE.md)
192
+
193
+ ## Author
194
+
195
+ Sergio Keberlein
196
+
197
+ ## Support
198
+
199
+ If you encounter any issues or have questions, please file an issue on the [GitHub repository](https://github.com/serkeb/tiendanube-node/issues).
@@ -0,0 +1,10 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class TiendanubeApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
10
+ //# sourceMappingURL=TiendanubeApi.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TiendanubeApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/TiendanubeApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,aAAc,YAAW,eAAe;IACpD,IAAI,SAAmB;IACvB,WAAW,SAAoB;IAC/B,gBAAgB,SAA0D;IAC1E,UAAU,EAAE,eAAe,EAAE,CAqB3B;IAGF,YAAY,EAAE,oBAAoB,CAShC;IAGF,IAAI,EAAE,sBAAsB,CAS1B;CACF"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TiendanubeApi = void 0;
4
+ class TiendanubeApi {
5
+ constructor() {
6
+ this.name = 'tiendanubeApi';
7
+ this.displayName = 'Tiendanube API';
8
+ this.documentationUrl = 'https://tiendanube.github.io/api-documentation/intro';
9
+ this.properties = [
10
+ {
11
+ displayName: 'Store ID',
12
+ name: 'storeId',
13
+ type: 'string',
14
+ default: '',
15
+ required: true,
16
+ description: 'Your Tiendanube Store ID (numeric ID of your store)',
17
+ placeholder: '1234567',
18
+ },
19
+ {
20
+ displayName: 'Access Token',
21
+ name: 'accessToken',
22
+ type: 'string',
23
+ typeOptions: {
24
+ password: true,
25
+ },
26
+ default: '',
27
+ required: true,
28
+ description: 'Your Tiendanube API Access Token',
29
+ },
30
+ ];
31
+ this.authenticate = {
32
+ type: 'generic',
33
+ properties: {
34
+ headers: {
35
+ 'Authentication': '=Bearer {{$credentials.accessToken}}',
36
+ 'User-Agent': 'n8n-tiendanube-node',
37
+ 'Content-Type': 'application/json',
38
+ },
39
+ },
40
+ };
41
+ this.test = {
42
+ request: {
43
+ baseURL: '=https://api.tiendanube.com/v1/{{$credentials.storeId}}',
44
+ url: '/products',
45
+ method: 'GET',
46
+ qs: {
47
+ per_page: 1,
48
+ },
49
+ },
50
+ };
51
+ }
52
+ }
53
+ exports.TiendanubeApi = TiendanubeApi;
54
+ //# sourceMappingURL=TiendanubeApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TiendanubeApi.credentials.js","sourceRoot":"","sources":["../../credentials/TiendanubeApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,qBAAgB,GAAG,sDAAsD,CAAC;QAC1E,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,qDAAqD;gBAClE,WAAW,EAAE,SAAS;aACtB;YACD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,kCAAkC;aAC/C;SACD,CAAC;QAGF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,gBAAgB,EAAE,sCAAsC;oBACxD,YAAY,EAAE,qBAAqB;oBACnC,cAAc,EAAE,kBAAkB;iBAClC;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,yDAAyD;gBAClE,GAAG,EAAE,WAAW;gBAChB,MAAM,EAAE,KAAK;gBACb,EAAE,EAAE;oBACH,QAAQ,EAAE,CAAC;iBACX;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAlDD,sCAkDC"}
@@ -0,0 +1,6 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Tiendanube implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
6
+ //# sourceMappingURL=Tiendanube.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tiendanube.node.d.ts","sourceRoot":"","sources":["../../../nodes/Tiendanube/Tiendanube.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAMpB,MAAM,cAAc,CAAC;AAEtB,qBAAa,UAAW,YAAW,SAAS;IAC3C,WAAW,EAAE,oBAAoB,CAkjB/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAoSvE"}
@@ -0,0 +1,793 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tiendanube = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ class Tiendanube {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'Tiendanube',
9
+ name: 'tiendanube',
10
+ icon: 'file:tiendanube.svg',
11
+ group: ['transform'],
12
+ version: 1,
13
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
14
+ description: 'Interact with Tiendanube/Nuvemshop API',
15
+ defaults: {
16
+ name: 'Tiendanube',
17
+ },
18
+ inputs: ['main'],
19
+ outputs: ['main'],
20
+ credentials: [
21
+ {
22
+ name: 'tiendanubeApi',
23
+ required: true,
24
+ },
25
+ ],
26
+ properties: [
27
+ {
28
+ displayName: 'Resource',
29
+ name: 'resource',
30
+ type: 'options',
31
+ noDataExpression: true,
32
+ options: [
33
+ {
34
+ name: 'Product',
35
+ value: 'product',
36
+ },
37
+ ],
38
+ default: 'product',
39
+ },
40
+ {
41
+ displayName: 'Operation',
42
+ name: 'operation',
43
+ type: 'options',
44
+ noDataExpression: true,
45
+ displayOptions: {
46
+ show: {
47
+ resource: ['product'],
48
+ },
49
+ },
50
+ options: [
51
+ {
52
+ name: 'Create',
53
+ value: 'create',
54
+ description: 'Create a new product',
55
+ action: 'Create a product',
56
+ },
57
+ {
58
+ name: 'Delete',
59
+ value: 'delete',
60
+ description: 'Delete a product',
61
+ action: 'Delete a product',
62
+ },
63
+ {
64
+ name: 'Get',
65
+ value: 'get',
66
+ description: 'Get a product by ID',
67
+ action: 'Get a product',
68
+ },
69
+ {
70
+ name: 'Get Many',
71
+ value: 'getAll',
72
+ description: 'Get many products',
73
+ action: 'Get many products',
74
+ },
75
+ {
76
+ name: 'Update',
77
+ value: 'update',
78
+ description: 'Update a product',
79
+ action: 'Update a product',
80
+ },
81
+ ],
82
+ default: 'get',
83
+ },
84
+ {
85
+ displayName: 'Product ID',
86
+ name: 'productId',
87
+ type: 'string',
88
+ required: true,
89
+ displayOptions: {
90
+ show: {
91
+ resource: ['product'],
92
+ operation: ['get', 'delete'],
93
+ },
94
+ },
95
+ default: '',
96
+ description: 'ID of the product to retrieve',
97
+ },
98
+ {
99
+ displayName: 'Return All',
100
+ name: 'returnAll',
101
+ type: 'boolean',
102
+ displayOptions: {
103
+ show: {
104
+ resource: ['product'],
105
+ operation: ['getAll'],
106
+ },
107
+ },
108
+ default: false,
109
+ description: 'Whether to return all results or only up to a given limit',
110
+ },
111
+ {
112
+ displayName: 'Limit',
113
+ name: 'limit',
114
+ type: 'number',
115
+ displayOptions: {
116
+ show: {
117
+ resource: ['product'],
118
+ operation: ['getAll'],
119
+ returnAll: [false],
120
+ },
121
+ },
122
+ typeOptions: {
123
+ minValue: 1,
124
+ maxValue: 200,
125
+ },
126
+ default: 50,
127
+ description: 'Max number of results to return',
128
+ },
129
+ {
130
+ displayName: 'Additional Fields',
131
+ name: 'additionalFields',
132
+ type: 'collection',
133
+ placeholder: 'Add Field',
134
+ default: {},
135
+ displayOptions: {
136
+ show: {
137
+ resource: ['product'],
138
+ operation: ['getAll'],
139
+ },
140
+ },
141
+ options: [
142
+ {
143
+ displayName: 'Published',
144
+ name: 'published',
145
+ type: 'boolean',
146
+ default: true,
147
+ description: 'Whether to filter by published status',
148
+ },
149
+ {
150
+ displayName: 'Free Shipping',
151
+ name: 'free_shipping',
152
+ type: 'boolean',
153
+ default: false,
154
+ description: 'Whether to filter by free shipping',
155
+ },
156
+ {
157
+ displayName: 'Category ID',
158
+ name: 'category_id',
159
+ type: 'string',
160
+ default: '',
161
+ description: 'Filter by category ID',
162
+ },
163
+ {
164
+ displayName: 'Search Query',
165
+ name: 'q',
166
+ type: 'string',
167
+ default: '',
168
+ description: 'Search products by name or description',
169
+ },
170
+ {
171
+ displayName: 'Sort By',
172
+ name: 'sort_by',
173
+ type: 'options',
174
+ options: [
175
+ {
176
+ name: 'Created At (Ascending)',
177
+ value: 'created-at-ascending',
178
+ },
179
+ {
180
+ name: 'Created At (Descending)',
181
+ value: 'created-at-descending',
182
+ },
183
+ {
184
+ name: 'Updated At (Ascending)',
185
+ value: 'updated-at-ascending',
186
+ },
187
+ {
188
+ name: 'Updated At (Descending)',
189
+ value: 'updated-at-descending',
190
+ },
191
+ {
192
+ name: 'Name (Ascending)',
193
+ value: 'name-ascending',
194
+ },
195
+ {
196
+ name: 'Name (Descending)',
197
+ value: 'name-descending',
198
+ },
199
+ {
200
+ name: 'Price (Ascending)',
201
+ value: 'price-ascending',
202
+ },
203
+ {
204
+ name: 'Price (Descending)',
205
+ value: 'price-descending',
206
+ },
207
+ ],
208
+ default: 'created-at-descending',
209
+ description: 'Sort products by field',
210
+ },
211
+ ],
212
+ },
213
+ {
214
+ displayName: 'Name',
215
+ name: 'name',
216
+ type: 'string',
217
+ required: true,
218
+ displayOptions: {
219
+ show: {
220
+ resource: ['product'],
221
+ operation: ['create'],
222
+ },
223
+ },
224
+ default: '',
225
+ description: 'Product name (Spanish). For multilingual use JSON format: {"es": "Producto", "en": "Product"}',
226
+ },
227
+ {
228
+ displayName: 'Additional Fields',
229
+ name: 'additionalFields',
230
+ type: 'collection',
231
+ placeholder: 'Add Field',
232
+ default: {},
233
+ displayOptions: {
234
+ show: {
235
+ resource: ['product'],
236
+ operation: ['create'],
237
+ },
238
+ },
239
+ options: [
240
+ {
241
+ displayName: 'Description',
242
+ name: 'description',
243
+ type: 'string',
244
+ typeOptions: {
245
+ rows: 4,
246
+ },
247
+ default: '',
248
+ description: 'Product description',
249
+ },
250
+ {
251
+ displayName: 'Price',
252
+ name: 'price',
253
+ type: 'number',
254
+ typeOptions: {
255
+ numberPrecision: 2,
256
+ },
257
+ default: 0,
258
+ description: 'Product price',
259
+ },
260
+ {
261
+ displayName: 'Promotional Price',
262
+ name: 'promotional_price',
263
+ type: 'number',
264
+ typeOptions: {
265
+ numberPrecision: 2,
266
+ },
267
+ default: 0,
268
+ description: 'Promotional price (if on sale)',
269
+ },
270
+ {
271
+ displayName: 'Cost Price',
272
+ name: 'cost_price',
273
+ type: 'number',
274
+ typeOptions: {
275
+ numberPrecision: 2,
276
+ },
277
+ default: 0,
278
+ description: 'Cost price of the product',
279
+ },
280
+ {
281
+ displayName: 'SKU',
282
+ name: 'sku',
283
+ type: 'string',
284
+ default: '',
285
+ description: 'Stock Keeping Unit',
286
+ },
287
+ {
288
+ displayName: 'Stock',
289
+ name: 'stock',
290
+ type: 'number',
291
+ default: 0,
292
+ description: 'Available stock quantity',
293
+ },
294
+ {
295
+ displayName: 'Published',
296
+ name: 'published',
297
+ type: 'boolean',
298
+ default: true,
299
+ description: 'Whether the product is published',
300
+ },
301
+ {
302
+ displayName: 'Free Shipping',
303
+ name: 'free_shipping',
304
+ type: 'boolean',
305
+ default: false,
306
+ description: 'Whether the product has free shipping',
307
+ },
308
+ {
309
+ displayName: 'Weight',
310
+ name: 'weight',
311
+ type: 'number',
312
+ typeOptions: {
313
+ numberPrecision: 2,
314
+ },
315
+ default: 0,
316
+ description: 'Product weight in kg',
317
+ },
318
+ {
319
+ displayName: 'Width',
320
+ name: 'width',
321
+ type: 'number',
322
+ typeOptions: {
323
+ numberPrecision: 2,
324
+ },
325
+ default: 0,
326
+ description: 'Product width in cm',
327
+ },
328
+ {
329
+ displayName: 'Height',
330
+ name: 'height',
331
+ type: 'number',
332
+ typeOptions: {
333
+ numberPrecision: 2,
334
+ },
335
+ default: 0,
336
+ description: 'Product height in cm',
337
+ },
338
+ {
339
+ displayName: 'Depth',
340
+ name: 'depth',
341
+ type: 'number',
342
+ typeOptions: {
343
+ numberPrecision: 2,
344
+ },
345
+ default: 0,
346
+ description: 'Product depth in cm',
347
+ },
348
+ {
349
+ displayName: 'Brand',
350
+ name: 'brand',
351
+ type: 'string',
352
+ default: '',
353
+ description: 'Product brand',
354
+ },
355
+ {
356
+ displayName: 'Categories (JSON)',
357
+ name: 'categories',
358
+ type: 'string',
359
+ default: '',
360
+ description: 'Product categories as JSON array. Example: [{"id": 123}, {"id": 456}]',
361
+ },
362
+ {
363
+ displayName: 'Images (JSON)',
364
+ name: 'images',
365
+ type: 'string',
366
+ default: '',
367
+ description: 'Product images as JSON array. Example: [{"src": "https://example.com/image.jpg"}]',
368
+ },
369
+ {
370
+ displayName: 'Variants (JSON)',
371
+ name: 'variants',
372
+ type: 'string',
373
+ default: '',
374
+ description: 'Product variants as JSON array',
375
+ },
376
+ ],
377
+ },
378
+ {
379
+ displayName: 'Product ID',
380
+ name: 'productId',
381
+ type: 'string',
382
+ required: true,
383
+ displayOptions: {
384
+ show: {
385
+ resource: ['product'],
386
+ operation: ['update'],
387
+ },
388
+ },
389
+ default: '',
390
+ description: 'ID of the product to update',
391
+ },
392
+ {
393
+ displayName: 'Update Fields',
394
+ name: 'updateFields',
395
+ type: 'collection',
396
+ placeholder: 'Add Field',
397
+ default: {},
398
+ displayOptions: {
399
+ show: {
400
+ resource: ['product'],
401
+ operation: ['update'],
402
+ },
403
+ },
404
+ options: [
405
+ {
406
+ displayName: 'Name',
407
+ name: 'name',
408
+ type: 'string',
409
+ default: '',
410
+ description: 'Product name',
411
+ },
412
+ {
413
+ displayName: 'Description',
414
+ name: 'description',
415
+ type: 'string',
416
+ typeOptions: {
417
+ rows: 4,
418
+ },
419
+ default: '',
420
+ description: 'Product description',
421
+ },
422
+ {
423
+ displayName: 'Price',
424
+ name: 'price',
425
+ type: 'number',
426
+ typeOptions: {
427
+ numberPrecision: 2,
428
+ },
429
+ default: 0,
430
+ description: 'Product price',
431
+ },
432
+ {
433
+ displayName: 'Promotional Price',
434
+ name: 'promotional_price',
435
+ type: 'number',
436
+ typeOptions: {
437
+ numberPrecision: 2,
438
+ },
439
+ default: 0,
440
+ description: 'Promotional price',
441
+ },
442
+ {
443
+ displayName: 'Cost Price',
444
+ name: 'cost_price',
445
+ type: 'number',
446
+ typeOptions: {
447
+ numberPrecision: 2,
448
+ },
449
+ default: 0,
450
+ description: 'Cost price',
451
+ },
452
+ {
453
+ displayName: 'SKU',
454
+ name: 'sku',
455
+ type: 'string',
456
+ default: '',
457
+ description: 'Stock Keeping Unit',
458
+ },
459
+ {
460
+ displayName: 'Stock',
461
+ name: 'stock',
462
+ type: 'number',
463
+ default: 0,
464
+ description: 'Available stock',
465
+ },
466
+ {
467
+ displayName: 'Published',
468
+ name: 'published',
469
+ type: 'boolean',
470
+ default: true,
471
+ description: 'Whether the product is published',
472
+ },
473
+ {
474
+ displayName: 'Free Shipping',
475
+ name: 'free_shipping',
476
+ type: 'boolean',
477
+ default: false,
478
+ description: 'Whether the product has free shipping',
479
+ },
480
+ {
481
+ displayName: 'Weight',
482
+ name: 'weight',
483
+ type: 'number',
484
+ typeOptions: {
485
+ numberPrecision: 2,
486
+ },
487
+ default: 0,
488
+ description: 'Product weight in kg',
489
+ },
490
+ {
491
+ displayName: 'Width',
492
+ name: 'width',
493
+ type: 'number',
494
+ typeOptions: {
495
+ numberPrecision: 2,
496
+ },
497
+ default: 0,
498
+ description: 'Product width in cm',
499
+ },
500
+ {
501
+ displayName: 'Height',
502
+ name: 'height',
503
+ type: 'number',
504
+ typeOptions: {
505
+ numberPrecision: 2,
506
+ },
507
+ default: 0,
508
+ description: 'Product height in cm',
509
+ },
510
+ {
511
+ displayName: 'Depth',
512
+ name: 'depth',
513
+ type: 'number',
514
+ typeOptions: {
515
+ numberPrecision: 2,
516
+ },
517
+ default: 0,
518
+ description: 'Product depth in cm',
519
+ },
520
+ {
521
+ displayName: 'Brand',
522
+ name: 'brand',
523
+ type: 'string',
524
+ default: '',
525
+ description: 'Product brand',
526
+ },
527
+ {
528
+ displayName: 'Categories (JSON)',
529
+ name: 'categories',
530
+ type: 'string',
531
+ default: '',
532
+ description: 'Categories as JSON array',
533
+ },
534
+ {
535
+ displayName: 'Images (JSON)',
536
+ name: 'images',
537
+ type: 'string',
538
+ default: '',
539
+ description: 'Images as JSON array',
540
+ },
541
+ {
542
+ displayName: 'Variants (JSON)',
543
+ name: 'variants',
544
+ type: 'string',
545
+ default: '',
546
+ description: 'Variants as JSON array',
547
+ },
548
+ ],
549
+ },
550
+ ],
551
+ };
552
+ }
553
+ async execute() {
554
+ const items = this.getInputData();
555
+ const returnData = [];
556
+ const resource = this.getNodeParameter('resource', 0);
557
+ const operation = this.getNodeParameter('operation', 0);
558
+ const credentials = await this.getCredentials('tiendanubeApi');
559
+ const storeId = credentials.storeId;
560
+ const accessToken = credentials.accessToken;
561
+ const baseUrl = `https://api.tiendanube.com/v1/${storeId}`;
562
+ const makeRequest = async (method, endpoint, body, qs) => {
563
+ const options = {
564
+ method,
565
+ url: `${baseUrl}${endpoint}`,
566
+ headers: {
567
+ 'Authentication': `Bearer ${accessToken}`,
568
+ 'User-Agent': 'n8n-tiendanube-node',
569
+ 'Content-Type': 'application/json',
570
+ },
571
+ body,
572
+ qs,
573
+ json: true,
574
+ };
575
+ try {
576
+ return await this.helpers.httpRequest(options);
577
+ }
578
+ catch (error) {
579
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
580
+ }
581
+ };
582
+ const parseMultilingualField = (value) => {
583
+ if (!value)
584
+ return value;
585
+ try {
586
+ const parsed = JSON.parse(value);
587
+ return parsed;
588
+ }
589
+ catch {
590
+ return { es: value };
591
+ }
592
+ };
593
+ const parseJsonField = (value) => {
594
+ if (!value)
595
+ return undefined;
596
+ try {
597
+ return JSON.parse(value);
598
+ }
599
+ catch {
600
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid JSON format: ${value}`);
601
+ }
602
+ };
603
+ for (let i = 0; i < items.length; i++) {
604
+ try {
605
+ if (resource === 'product') {
606
+ if (operation === 'get') {
607
+ const productId = this.getNodeParameter('productId', i);
608
+ const response = await makeRequest('GET', `/products/${productId}`);
609
+ returnData.push(response);
610
+ }
611
+ else if (operation === 'getAll') {
612
+ const returnAll = this.getNodeParameter('returnAll', i);
613
+ const additionalFields = this.getNodeParameter('additionalFields', i);
614
+ let products = [];
615
+ const qs = {
616
+ per_page: 200,
617
+ };
618
+ if (additionalFields.published !== undefined) {
619
+ qs.published = additionalFields.published;
620
+ }
621
+ if (additionalFields.free_shipping !== undefined) {
622
+ qs.free_shipping = additionalFields.free_shipping;
623
+ }
624
+ if (additionalFields.category_id) {
625
+ qs.category_id = additionalFields.category_id;
626
+ }
627
+ if (additionalFields.q) {
628
+ qs.q = additionalFields.q;
629
+ }
630
+ if (additionalFields.sort_by) {
631
+ qs.sort_by = additionalFields.sort_by;
632
+ }
633
+ if (returnAll) {
634
+ let page = 1;
635
+ let hasMore = true;
636
+ while (hasMore) {
637
+ qs.page = page;
638
+ const response = await makeRequest('GET', '/products', undefined, qs);
639
+ if (Array.isArray(response) && response.length > 0) {
640
+ products = products.concat(response);
641
+ page++;
642
+ if (response.length < 200) {
643
+ hasMore = false;
644
+ }
645
+ }
646
+ else {
647
+ hasMore = false;
648
+ }
649
+ }
650
+ }
651
+ else {
652
+ const limit = this.getNodeParameter('limit', i);
653
+ qs.per_page = limit;
654
+ const response = await makeRequest('GET', '/products', undefined, qs);
655
+ products = Array.isArray(response) ? response : [response];
656
+ }
657
+ returnData.push(...products);
658
+ }
659
+ else if (operation === 'create') {
660
+ const name = this.getNodeParameter('name', i);
661
+ const additionalFields = this.getNodeParameter('additionalFields', i);
662
+ const body = {
663
+ name: parseMultilingualField(name),
664
+ };
665
+ if (additionalFields.description) {
666
+ body.description = parseMultilingualField(additionalFields.description);
667
+ }
668
+ if (additionalFields.price !== undefined) {
669
+ body.price = additionalFields.price;
670
+ }
671
+ if (additionalFields.promotional_price !== undefined) {
672
+ body.promotional_price = additionalFields.promotional_price;
673
+ }
674
+ if (additionalFields.cost_price !== undefined) {
675
+ body.cost_price = additionalFields.cost_price;
676
+ }
677
+ if (additionalFields.sku) {
678
+ body.sku = additionalFields.sku;
679
+ }
680
+ if (additionalFields.stock !== undefined) {
681
+ body.stock = additionalFields.stock;
682
+ }
683
+ if (additionalFields.published !== undefined) {
684
+ body.published = additionalFields.published;
685
+ }
686
+ if (additionalFields.free_shipping !== undefined) {
687
+ body.free_shipping = additionalFields.free_shipping;
688
+ }
689
+ if (additionalFields.weight !== undefined) {
690
+ body.weight = additionalFields.weight;
691
+ }
692
+ if (additionalFields.width !== undefined) {
693
+ body.width = additionalFields.width;
694
+ }
695
+ if (additionalFields.height !== undefined) {
696
+ body.height = additionalFields.height;
697
+ }
698
+ if (additionalFields.depth !== undefined) {
699
+ body.depth = additionalFields.depth;
700
+ }
701
+ if (additionalFields.brand) {
702
+ body.brand = additionalFields.brand;
703
+ }
704
+ if (additionalFields.categories) {
705
+ body.categories = parseJsonField(additionalFields.categories);
706
+ }
707
+ if (additionalFields.images) {
708
+ body.images = parseJsonField(additionalFields.images);
709
+ }
710
+ if (additionalFields.variants) {
711
+ body.variants = parseJsonField(additionalFields.variants);
712
+ }
713
+ const response = await makeRequest('POST', '/products', body);
714
+ returnData.push(response);
715
+ }
716
+ else if (operation === 'update') {
717
+ const productId = this.getNodeParameter('productId', i);
718
+ const updateFields = this.getNodeParameter('updateFields', i);
719
+ const body = {};
720
+ if (updateFields.name) {
721
+ body.name = parseMultilingualField(updateFields.name);
722
+ }
723
+ if (updateFields.description) {
724
+ body.description = parseMultilingualField(updateFields.description);
725
+ }
726
+ if (updateFields.price !== undefined) {
727
+ body.price = updateFields.price;
728
+ }
729
+ if (updateFields.promotional_price !== undefined) {
730
+ body.promotional_price = updateFields.promotional_price;
731
+ }
732
+ if (updateFields.cost_price !== undefined) {
733
+ body.cost_price = updateFields.cost_price;
734
+ }
735
+ if (updateFields.sku) {
736
+ body.sku = updateFields.sku;
737
+ }
738
+ if (updateFields.stock !== undefined) {
739
+ body.stock = updateFields.stock;
740
+ }
741
+ if (updateFields.published !== undefined) {
742
+ body.published = updateFields.published;
743
+ }
744
+ if (updateFields.free_shipping !== undefined) {
745
+ body.free_shipping = updateFields.free_shipping;
746
+ }
747
+ if (updateFields.weight !== undefined) {
748
+ body.weight = updateFields.weight;
749
+ }
750
+ if (updateFields.width !== undefined) {
751
+ body.width = updateFields.width;
752
+ }
753
+ if (updateFields.height !== undefined) {
754
+ body.height = updateFields.height;
755
+ }
756
+ if (updateFields.depth !== undefined) {
757
+ body.depth = updateFields.depth;
758
+ }
759
+ if (updateFields.brand) {
760
+ body.brand = updateFields.brand;
761
+ }
762
+ if (updateFields.categories) {
763
+ body.categories = parseJsonField(updateFields.categories);
764
+ }
765
+ if (updateFields.images) {
766
+ body.images = parseJsonField(updateFields.images);
767
+ }
768
+ if (updateFields.variants) {
769
+ body.variants = parseJsonField(updateFields.variants);
770
+ }
771
+ const response = await makeRequest('PUT', `/products/${productId}`, body);
772
+ returnData.push(response);
773
+ }
774
+ else if (operation === 'delete') {
775
+ const productId = this.getNodeParameter('productId', i);
776
+ await makeRequest('DELETE', `/products/${productId}`);
777
+ returnData.push({ success: true, id: productId });
778
+ }
779
+ }
780
+ }
781
+ catch (error) {
782
+ if (this.continueOnFail()) {
783
+ returnData.push({ error: error.message });
784
+ continue;
785
+ }
786
+ throw error;
787
+ }
788
+ }
789
+ return [this.helpers.returnJsonArray(returnData)];
790
+ }
791
+ }
792
+ exports.Tiendanube = Tiendanube;
793
+ //# sourceMappingURL=Tiendanube.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tiendanube.node.js","sourceRoot":"","sources":["../../../nodes/Tiendanube/Tiendanube.node.ts"],"names":[],"mappings":";;;AAAA,+CAUsB;AAEtB,MAAa,UAAU;IAAvB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE;gBACT,IAAI,EAAE,YAAY;aAClB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAA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,CAAC,QAAQ,EAAE,aAAa,SAAS,EAAE,CAAC,CAAC;wBACtD,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;oBACnD,CAAC;gBACF,CAAC;YACF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;oBACrD,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IACnD,CAAC;CACD;AAz1BD,gCAy1BC"}
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
2
+ <!-- Background circle -->
3
+ <circle cx="50" cy="50" r="48" fill="#3B82F6" stroke="#1E40AF" stroke-width="2"/>
4
+
5
+ <!-- TN Text -->
6
+ <text x="50" y="63" font-family="Arial, sans-serif" font-size="40" font-weight="bold" fill="#FFFFFF" text-anchor="middle">TN</text>
7
+ </svg>
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "n8n-nodes-tiendanube",
3
+ "version": "0.1.0",
4
+ "description": "n8n node for Tiendanube/Nuvemshop API integration",
5
+ "keywords": [
6
+ "n8n-community-node-package",
7
+ "n8n",
8
+ "tiendanube",
9
+ "nuvemshop",
10
+ "ecommerce"
11
+ ],
12
+ "license": "MIT",
13
+ "homepage": "https://github.com/serkeb/tiendanube-node",
14
+ "author": {
15
+ "name": "Sergio Keberlein",
16
+ "email": "sergio@example.com"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/serkeb/tiendanube-node.git"
21
+ },
22
+ "main": "dist/index.js",
23
+ "scripts": {
24
+ "build": "tsc && gulp build:icons",
25
+ "dev": "tsc --watch",
26
+ "format": "prettier --write 'credentials/**/*.ts' 'nodes/**/*.ts'",
27
+ "lint": "eslint credentials nodes",
28
+ "prepublishOnly": "npm run build"
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "n8n": {
34
+ "n8nNodesApiVersion": 1,
35
+ "credentials": [
36
+ "dist/credentials/TiendanubeApi.credentials.js"
37
+ ],
38
+ "nodes": [
39
+ "dist/nodes/Tiendanube/Tiendanube.node.js"
40
+ ]
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^18.16.0",
44
+ "gulp": "^4.0.2",
45
+ "n8n-workflow": "^1.0.0",
46
+ "typescript": "^5.0.0"
47
+ },
48
+ "peerDependencies": {
49
+ "n8n-workflow": "*"
50
+ }
51
+ }