n8n-nodes-storelink 0.0.0-stage → 0.1.3
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 +21 -0
- package/README.md +103 -2
- package/dist/credentials/StorelinkApi.credentials.d.ts +10 -0
- package/dist/credentials/StorelinkApi.credentials.js +46 -0
- package/dist/credentials/StorelinkApi.credentials.js.map +1 -0
- package/dist/icons/storelink.svg +3 -0
- package/dist/nodes/Storelink/Storelink.node.d.ts +10 -0
- package/dist/nodes/Storelink/Storelink.node.js +85 -0
- package/dist/nodes/Storelink/Storelink.node.js.map +1 -0
- package/dist/nodes/Storelink/Storelink.node.json +18 -0
- package/dist/nodes/Storelink/resources/coupon.d.ts +2 -0
- package/dist/nodes/Storelink/resources/coupon.js +156 -0
- package/dist/nodes/Storelink/resources/coupon.js.map +1 -0
- package/dist/nodes/Storelink/resources/customer.d.ts +2 -0
- package/dist/nodes/Storelink/resources/customer.js +90 -0
- package/dist/nodes/Storelink/resources/customer.js.map +1 -0
- package/dist/nodes/Storelink/resources/order.d.ts +2 -0
- package/dist/nodes/Storelink/resources/order.js +279 -0
- package/dist/nodes/Storelink/resources/order.js.map +1 -0
- package/dist/nodes/Storelink/resources/product.d.ts +2 -0
- package/dist/nodes/Storelink/resources/product.js +47 -0
- package/dist/nodes/Storelink/resources/product.js.map +1 -0
- package/dist/nodes/Storelink/shared/getMany.d.ts +3 -0
- package/dist/nodes/Storelink/shared/getMany.js +46 -0
- package/dist/nodes/Storelink/shared/getMany.js.map +1 -0
- package/dist/nodes/Storelink/shared/productLocator.d.ts +3 -0
- package/dist/nodes/Storelink/shared/productLocator.js +39 -0
- package/dist/nodes/Storelink/shared/productLocator.js.map +1 -0
- package/dist/nodes/Storelink/shared/transport.d.ts +16 -0
- package/dist/nodes/Storelink/shared/transport.js +61 -0
- package/dist/nodes/Storelink/shared/transport.js.map +1 -0
- package/dist/nodes/StorelinkTrigger/StorelinkTrigger.node.d.ts +12 -0
- package/dist/nodes/StorelinkTrigger/StorelinkTrigger.node.js +121 -0
- package/dist/nodes/StorelinkTrigger/StorelinkTrigger.node.js.map +1 -0
- package/dist/nodes/StorelinkTrigger/StorelinkTrigger.node.json +18 -0
- package/dist/nodes/StorelinkTrigger/signature.d.ts +1 -0
- package/dist/nodes/StorelinkTrigger/signature.js +31 -0
- package/dist/nodes/StorelinkTrigger/signature.js.map +1 -0
- package/dist/package.json +59 -0
- package/package.json +58 -5
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Storelink
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
9
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
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
CHANGED
|
@@ -1,3 +1,104 @@
|
|
|
1
|
-
#
|
|
1
|
+
# n8n-nodes-storelink
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This is an n8n community node. It lets you use Storelink in your n8n workflows.
|
|
4
|
+
|
|
5
|
+
[Storelink](https://store.link) runs online stores whose products live in a Google Sheet.
|
|
6
|
+
|
|
7
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
|
|
8
|
+
|
|
9
|
+
[Installation](#installation)
|
|
10
|
+
[Operations](#operations)
|
|
11
|
+
[Credentials](#credentials)
|
|
12
|
+
[Compatibility](#compatibility)
|
|
13
|
+
[Usage](#usage)
|
|
14
|
+
[Resources](#resources)
|
|
15
|
+
[Version history](#version-history)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation and install `n8n-nodes-storelink`.
|
|
20
|
+
|
|
21
|
+
## Operations
|
|
22
|
+
|
|
23
|
+
**Storelink Trigger** starts a workflow when one of these happens in a store:
|
|
24
|
+
|
|
25
|
+
- New Order
|
|
26
|
+
- Order Status Changed
|
|
27
|
+
- New Customer
|
|
28
|
+
|
|
29
|
+
Each run gets one item: the event as Storelink sends it. `data` is the order or customer. `previous` holds the earlier status for Order Status Changed and is `null` for the other events. `source` says what caused the event, such as `storefront`, `dashboard`, or `n8n` for a change an n8n workflow made.
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"id": "evt_01JC8V5Q6T2Z3M4N5P6R7S8T9V",
|
|
34
|
+
"type": "order.status_changed",
|
|
35
|
+
"created_at": "2026-11-01T10:15:00.000Z",
|
|
36
|
+
"store_id": "6403015fb9de96fc86f364ad",
|
|
37
|
+
"source": "dashboard",
|
|
38
|
+
"data": {
|
|
39
|
+
"order_id": "6724a1f0c2b5e8a1d4f3b2c1",
|
|
40
|
+
"number": 10001,
|
|
41
|
+
"status": "shipped",
|
|
42
|
+
"...": "..."
|
|
43
|
+
},
|
|
44
|
+
"previous": { "status": "pending" }
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Storelink** works with a store's records:
|
|
49
|
+
|
|
50
|
+
| Resource | Operations |
|
|
51
|
+
| -------- | -------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| Order | Create, Get, Get Many (filter by order number, customer email, or status), Update Status, Add Note |
|
|
53
|
+
| Customer | Create, Get Many (filter by email and phone) |
|
|
54
|
+
| Product | Get Many (search by name) |
|
|
55
|
+
| Coupon | Create, for the whole order or for specific products |
|
|
56
|
+
|
|
57
|
+
## Credentials
|
|
58
|
+
|
|
59
|
+
You need a Storelink store on a plan that includes integrations.
|
|
60
|
+
|
|
61
|
+
1. In Storelink, open the store's **Settings > Integrations** page and click **Create API key** on the n8n card.
|
|
62
|
+
2. Copy the key. It starts with `sl_key_`, and Storelink shows it only once.
|
|
63
|
+
3. In n8n, create a **Storelink API** credential and paste the key into **API Key**. Leave **Server URL** as it is.
|
|
64
|
+
|
|
65
|
+
A key serves one store. For several stores, create one key and one credential for each store.
|
|
66
|
+
|
|
67
|
+
The key can do what the team member who created it can do in the store. If that member's role changes, create a new key as a store owner or manager.
|
|
68
|
+
|
|
69
|
+
**Regenerate key** on the same card replaces the key. Every credential that holds the old key stops working until you paste in the new one. Active triggers keep their subscriptions, so no events are lost while you do. **Disconnect** revokes the key and ends the triggers' subscriptions.
|
|
70
|
+
|
|
71
|
+
## Compatibility
|
|
72
|
+
|
|
73
|
+
Built with `@n8n/node-cli` 0.55.5 against n8n 2.x.
|
|
74
|
+
|
|
75
|
+
## Usage
|
|
76
|
+
|
|
77
|
+
- **Triggers need n8n at a public https URL.** n8n Cloud works as it is. A self-hosted n8n needs a public https webhook URL (n8n's `N8N_WEBHOOK_URL` setting, or `WEBHOOK_URL` before n8n 2.35). Storelink refuses `localhost` and private addresses, so a trigger on `http://localhost:5678` fails to activate and n8n shows Storelink's message. The Storelink node works from any n8n.
|
|
78
|
+
- **To test a trigger,** click **Listen for test event**, then place an order, change an order's status, or add a customer in Storelink.
|
|
79
|
+
- **Deliveries are signed.** The trigger checks each delivery's signature and rejects anything Storelink didn't send.
|
|
80
|
+
- **Customer Get Many filters are ANDed.** A customer must match every filter you set, so map either the email or the phone, not both. To try the other one when the first finds no one, add a second Get Many behind an If node.
|
|
81
|
+
- **Get Many** outputs one item per record, newest first for orders and customers. Turn on **Return All** for every record, or set **Limit**.
|
|
82
|
+
- **Create Order's Reference** makes a retry safe. Map a unique ID from an earlier step, such as a form response ID. A run with a reference Storelink has seen returns the first order instead of creating another.
|
|
83
|
+
- **Line items** take a product from the list or by its slug. A product with several variants also needs a **Variant Key**, which Get Many Products returns under `variants`.
|
|
84
|
+
- **Errors** show Storelink's own message. If a workflow sends too many requests, turn on **Retry On Fail** in the node's settings.
|
|
85
|
+
- **Create Coupon** makes a coupon for the whole order or for specific products. Buy X Get Y coupons can't be created here.
|
|
86
|
+
|
|
87
|
+
## Resources
|
|
88
|
+
|
|
89
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
90
|
+
- [Storelink](https://store.link)
|
|
91
|
+
|
|
92
|
+
## Version history
|
|
93
|
+
|
|
94
|
+
### 0.1.3
|
|
95
|
+
|
|
96
|
+
Published with npm provenance. No changes to the nodes.
|
|
97
|
+
|
|
98
|
+
### 0.1.2
|
|
99
|
+
|
|
100
|
+
The package is now `n8n-nodes-storelink`. Install it under this name: the earlier scoped package installs, but its nodes fail on every execution.
|
|
101
|
+
|
|
102
|
+
### 0.1.0
|
|
103
|
+
|
|
104
|
+
The first release: Storelink Trigger, and the Storelink node with orders, customers, products, and coupons.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class StorelinkApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StorelinkApi = void 0;
|
|
4
|
+
class StorelinkApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'storelinkApi';
|
|
7
|
+
this.displayName = 'Storelink API';
|
|
8
|
+
this.icon = { light: 'file:../icons/storelink.svg', dark: 'file:../icons/storelink.svg' };
|
|
9
|
+
this.documentationUrl = 'https://github.com/microdotcompany/storelink-n8n-nodes#credentials';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'API Key',
|
|
13
|
+
name: 'apiKey',
|
|
14
|
+
type: 'string',
|
|
15
|
+
typeOptions: { password: true },
|
|
16
|
+
required: true,
|
|
17
|
+
default: '',
|
|
18
|
+
description: "Create one on the store's Settings > Integrations page in Storelink",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Server URL',
|
|
22
|
+
name: 'serverUrl',
|
|
23
|
+
type: 'string',
|
|
24
|
+
default: 'https://dashboard.store.link',
|
|
25
|
+
description: 'Leave this as it is unless Storelink support asks you to change it',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
this.authenticate = {
|
|
29
|
+
type: 'generic',
|
|
30
|
+
properties: {
|
|
31
|
+
headers: {
|
|
32
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
this.test = {
|
|
37
|
+
request: {
|
|
38
|
+
baseURL: '={{$credentials.serverUrl.replace(/\\/$/, "")}}/apps/v1',
|
|
39
|
+
url: '/me',
|
|
40
|
+
method: 'GET',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.StorelinkApi = StorelinkApi;
|
|
46
|
+
//# sourceMappingURL=StorelinkApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorelinkApi.credentials.js","sourceRoot":"","sources":["../../credentials/StorelinkApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QAEtB,gBAAW,GAAG,eAAe,CAAC;QAE9B,SAAI,GAAS,EAAE,KAAK,EAAE,6BAA6B,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC;QAE3F,qBAAgB,GAAG,oEAAoE,CAAC;QAExF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,qEAAqE;aAClF;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,8BAA8B;gBACvC,WAAW,EAAE,oEAAoE;aACjF;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,yDAAyD;gBAClE,GAAG,EAAE,KAAK;gBACV,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AA5CD,oCA4CC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" version="1.1">
|
|
2
|
+
<path d="M 494.500 35.475 C 421.155 43.932, 361.998 84.812, 330.944 148.500 C 316.046 179.055, 310 209.118, 310 252.645 L 310 270 193.947 270 C 65.157 270, 69.849 269.773, 58.343 276.570 C 48.066 282.641, 41.265 291.617, 37.612 303.932 C 35.509 311.019, 35.579 316.308, 38.016 334.474 C 39.125 342.738, 53.060 454.125, 68.982 582 C 84.905 709.875, 98.653 818.325, 99.534 823 C 111.473 886.400, 152.582 940.116, 210.500 967.995 C 227.255 976.060, 240.854 980.416, 266 985.773 C 277.471 988.216, 736.544 988.860, 754 986.457 C 838.490 974.826, 903.756 916.657, 924.552 834.448 C 927.943 821.046, 928.092 819.957, 941.505 710.500 C 945.078 681.350, 950.537 637.025, 953.637 612 C 960.085 559.946, 960.093 556.651, 953.796 544.696 C 939.492 517.537, 904.410 511.993, 882.169 533.375 C 869.249 545.796, 869.619 543.930, 851.951 686 C 843.710 752.275, 836.092 809.905, 835.024 814.066 C 824.517 854.995, 789.629 887.544, 747.750 895.488 C 735.797 897.755, 289.714 897.776, 276.719 895.510 C 237.878 888.737, 204.347 859.406, 191.609 821.062 C 187.717 809.346, 187.810 809.971, 177.079 722.500 C 172.352 683.970, 154.828 541.592, 146.062 470.500 C 135.946 388.455, 133 364.123, 133 362.622 C 133 361.130, 156.110 361, 421.545 361 L 710.091 361 712.545 358.545 L 715 356.091 714.999 293.295 C 714.999 257.822, 714.548 225.714, 713.964 219.500 C 707.468 150.385, 667.796 90.608, 606.842 58.088 C 574.016 40.575, 528.948 31.503, 494.500 35.475 M 495.500 126.654 C 455.592 132.973, 421.382 161.502, 407.558 199.994 C 402.657 213.640, 401.910 219.053, 401.308 245.250 L 400.740 270 512.480 270 L 624.221 270 623.730 244.750 C 623.315 223.382, 622.914 218.220, 621.117 211.172 C 610.804 170.729, 580.183 139.516, 540.384 128.880 C 532.608 126.802, 503.642 125.365, 495.500 126.654 M 821.500 269.446 C 820.950 269.642, 818.025 270.566, 815 271.499 C 787.504 279.977, 776.168 316.389, 793.622 340.166 C 798.564 346.898, 807.857 353.639, 815.153 355.783 C 818.367 356.727, 820.998 357.759, 820.999 358.076 C 820.999 358.393, 815.759 362.893, 809.353 368.076 C 798.657 376.731, 772.044 398.961, 709.477 451.500 C 679.877 476.356, 677.344 479.467, 672.761 496.604 C 670.031 506.809, 674.976 524.147, 683.319 533.625 C 696.893 549.045, 721.540 553.358, 738.735 543.321 C 741.356 541.791, 747.550 537.143, 752.500 532.992 C 757.450 528.841, 784 506.536, 811.500 483.426 C 839 460.317, 866.753 437.001, 873.173 431.613 C 879.594 426.225, 885.219 421.841, 885.673 421.870 C 886.128 421.900, 886.812 424.048, 887.193 426.645 C 888.707 436.954, 898.558 450.770, 908.493 456.520 C 925.401 466.304, 947.442 464.045, 962.251 451.010 C 973.640 440.985, 977.123 430.991, 979.918 400.307 C 986.715 325.713, 987.323 316.758, 986.147 308.518 C 983.664 291.120, 973.214 278.585, 955.967 272.313 L 948.500 269.598 885.500 269.343 C 850.850 269.203, 822.050 269.249, 821.500 269.446" stroke="none" fill="#2AB200" fill-rule="evenodd"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { searchProducts } from './shared/productLocator';
|
|
2
|
+
import { type INodeType, type INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
+
export declare class Storelink implements INodeType {
|
|
4
|
+
description: INodeTypeDescription;
|
|
5
|
+
methods: {
|
|
6
|
+
listSearch: {
|
|
7
|
+
searchProducts: typeof searchProducts;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Storelink = void 0;
|
|
4
|
+
const coupon_1 = require("./resources/coupon");
|
|
5
|
+
const customer_1 = require("./resources/customer");
|
|
6
|
+
const order_1 = require("./resources/order");
|
|
7
|
+
const product_1 = require("./resources/product");
|
|
8
|
+
const productLocator_1 = require("./shared/productLocator");
|
|
9
|
+
const transport_1 = require("./shared/transport");
|
|
10
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
11
|
+
class Storelink {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.description = {
|
|
14
|
+
displayName: 'Storelink',
|
|
15
|
+
name: 'storelink',
|
|
16
|
+
icon: { light: 'file:../../icons/storelink.svg', dark: 'file:../../icons/storelink.svg' },
|
|
17
|
+
group: ['transform'],
|
|
18
|
+
version: 1,
|
|
19
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
20
|
+
description: 'Work with orders, customers, products and coupons in Storelink',
|
|
21
|
+
defaults: {
|
|
22
|
+
name: 'Storelink',
|
|
23
|
+
},
|
|
24
|
+
usableAsTool: true,
|
|
25
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
26
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
27
|
+
credentials: [
|
|
28
|
+
{
|
|
29
|
+
name: 'storelinkApi',
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
requestDefaults: {
|
|
34
|
+
baseURL: transport_1.API_BASE_URL,
|
|
35
|
+
headers: {
|
|
36
|
+
Accept: 'application/json',
|
|
37
|
+
'Content-Type': 'application/json',
|
|
38
|
+
},
|
|
39
|
+
ignoreHttpStatusErrors: true,
|
|
40
|
+
},
|
|
41
|
+
properties: [
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Resource',
|
|
44
|
+
name: 'resource',
|
|
45
|
+
type: 'options',
|
|
46
|
+
noDataExpression: true,
|
|
47
|
+
options: [
|
|
48
|
+
{
|
|
49
|
+
name: 'Coupon',
|
|
50
|
+
value: 'coupon',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Customer',
|
|
54
|
+
value: 'customer',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'Order',
|
|
58
|
+
value: 'order',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Product',
|
|
62
|
+
value: 'product',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
default: 'order',
|
|
66
|
+
routing: {
|
|
67
|
+
send: { preSend: [transport_1.dropBlanks] },
|
|
68
|
+
output: { postReceive: [transport_1.throwApiError] },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
...order_1.orderDescription,
|
|
72
|
+
...customer_1.customerDescription,
|
|
73
|
+
...product_1.productDescription,
|
|
74
|
+
...coupon_1.couponDescription,
|
|
75
|
+
],
|
|
76
|
+
};
|
|
77
|
+
this.methods = {
|
|
78
|
+
listSearch: {
|
|
79
|
+
searchProducts: productLocator_1.searchProducts,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.Storelink = Storelink;
|
|
85
|
+
//# sourceMappingURL=Storelink.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Storelink.node.js","sourceRoot":"","sources":["../../../nodes/Storelink/Storelink.node.ts"],"names":[],"mappings":";;;AAAA,+CAAuD;AACvD,mDAA2D;AAC3D,6CAAqD;AACrD,iDAAyD;AACzD,4DAAyD;AACzD,kDAA6E;AAC7E,+CAA8F;AAE9F,MAAa,SAAS;IAAtB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,IAAI,EAAE,gCAAgC,EAAE;YACzF,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,gEAAgE;YAC7E,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;aACjB;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EA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"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/microdotcompany/storelink-n8n-nodes#credentials"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/microdotcompany/storelink-n8n-nodes#readme"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.couponDescription = void 0;
|
|
4
|
+
const productLocator_1 = require("../shared/productLocator");
|
|
5
|
+
const show = (extra = {}) => ({
|
|
6
|
+
show: { resource: ['coupon'], operation: ['create'], ...extra },
|
|
7
|
+
});
|
|
8
|
+
const WITH_OFFSET = '={{ DateTime.fromISO($value).toISO() ?? $value }}';
|
|
9
|
+
exports.couponDescription = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Operation',
|
|
12
|
+
name: 'operation',
|
|
13
|
+
type: 'options',
|
|
14
|
+
noDataExpression: true,
|
|
15
|
+
displayOptions: { show: { resource: ['coupon'] } },
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Create',
|
|
19
|
+
value: 'create',
|
|
20
|
+
action: 'Create a coupon',
|
|
21
|
+
description: 'Create a coupon for the whole order or for specific products',
|
|
22
|
+
routing: { request: { method: 'POST', url: '/coupons' } },
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
default: 'create',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Code',
|
|
29
|
+
name: 'code',
|
|
30
|
+
type: 'string',
|
|
31
|
+
required: true,
|
|
32
|
+
default: '',
|
|
33
|
+
displayOptions: show(),
|
|
34
|
+
routing: { send: { type: 'body', property: 'code' } },
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Applies To',
|
|
38
|
+
name: 'appliesTo',
|
|
39
|
+
type: 'options',
|
|
40
|
+
required: true,
|
|
41
|
+
options: [
|
|
42
|
+
{
|
|
43
|
+
name: 'Specific Products',
|
|
44
|
+
value: 'products',
|
|
45
|
+
routing: { request: { body: { type: 'amountOffProduct', appliesTo: 'products' } } },
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'The Whole Order',
|
|
49
|
+
value: 'order',
|
|
50
|
+
routing: { request: { body: { type: 'amountOffOrder' } } },
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
default: 'order',
|
|
54
|
+
displayOptions: show(),
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Products',
|
|
58
|
+
name: 'products',
|
|
59
|
+
type: 'fixedCollection',
|
|
60
|
+
typeOptions: { multipleValues: true },
|
|
61
|
+
placeholder: 'Add Product',
|
|
62
|
+
required: true,
|
|
63
|
+
default: {},
|
|
64
|
+
displayOptions: show({ appliesTo: ['products'] }),
|
|
65
|
+
options: [
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Product',
|
|
68
|
+
name: 'product',
|
|
69
|
+
values: [(0, productLocator_1.productLocator)('=targets[{{$index}}].slug')],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Discount Type',
|
|
75
|
+
name: 'discountType',
|
|
76
|
+
type: 'options',
|
|
77
|
+
required: true,
|
|
78
|
+
options: [
|
|
79
|
+
{ name: 'Flat Amount', value: 'flat' },
|
|
80
|
+
{ name: 'Percentage', value: 'percentage' },
|
|
81
|
+
],
|
|
82
|
+
default: 'percentage',
|
|
83
|
+
displayOptions: show(),
|
|
84
|
+
routing: { send: { type: 'body', property: 'discountType' } },
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Discount Amount',
|
|
88
|
+
name: 'discountAmount',
|
|
89
|
+
type: 'number',
|
|
90
|
+
required: true,
|
|
91
|
+
typeOptions: { minValue: 0 },
|
|
92
|
+
default: 0,
|
|
93
|
+
displayOptions: show(),
|
|
94
|
+
routing: { send: { type: 'body', property: 'discountAmount' } },
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
displayName: 'Additional Fields',
|
|
98
|
+
name: 'additionalFields',
|
|
99
|
+
type: 'collection',
|
|
100
|
+
placeholder: 'Add Field',
|
|
101
|
+
default: {},
|
|
102
|
+
displayOptions: show(),
|
|
103
|
+
options: [
|
|
104
|
+
{
|
|
105
|
+
displayName: 'Enabled',
|
|
106
|
+
name: 'enabled',
|
|
107
|
+
type: 'boolean',
|
|
108
|
+
default: true,
|
|
109
|
+
description: 'Whether customers can use the coupon',
|
|
110
|
+
routing: { send: { type: 'body', property: 'enabled' } },
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
displayName: 'Maximum Discount Amount',
|
|
114
|
+
name: 'maxDiscountAmount',
|
|
115
|
+
type: 'number',
|
|
116
|
+
typeOptions: { minValue: 0 },
|
|
117
|
+
default: 0,
|
|
118
|
+
routing: { send: { type: 'body', property: 'maxDiscountAmount' } },
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
displayName: 'Minimum Order Amount',
|
|
122
|
+
name: 'minOrderAmount',
|
|
123
|
+
type: 'number',
|
|
124
|
+
typeOptions: { minValue: 0 },
|
|
125
|
+
default: 0,
|
|
126
|
+
routing: { send: { type: 'body', property: 'minOrderAmount' } },
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
displayName: 'Uses Per Customer',
|
|
130
|
+
name: 'usePerCustomer',
|
|
131
|
+
type: 'options',
|
|
132
|
+
options: [
|
|
133
|
+
{ name: 'Once', value: 'once' },
|
|
134
|
+
{ name: 'Unlimited', value: 'unlimited' },
|
|
135
|
+
],
|
|
136
|
+
default: 'once',
|
|
137
|
+
routing: { send: { type: 'body', property: 'usePerCustomer' } },
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
displayName: 'Valid From',
|
|
141
|
+
name: 'validFrom',
|
|
142
|
+
type: 'dateTime',
|
|
143
|
+
default: '',
|
|
144
|
+
routing: { send: { type: 'body', property: 'validFrom', value: WITH_OFFSET } },
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
displayName: 'Valid Till',
|
|
148
|
+
name: 'validTill',
|
|
149
|
+
type: 'dateTime',
|
|
150
|
+
default: '',
|
|
151
|
+
routing: { send: { type: 'body', property: 'validTill', value: WITH_OFFSET } },
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
//# sourceMappingURL=coupon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coupon.js","sourceRoot":"","sources":["../../../../nodes/Storelink/resources/coupon.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAG1D,MAAM,IAAI,GAAG,CAAC,QAAkC,EAAE,EAAE,EAAE,CAAC,CAAC;IACvD,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE;CAC/D,CAAC,CAAC;AAGH,MAAM,WAAW,GAAG,mDAAmD,CAAC;AAE3D,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE;QAClD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,iBAAiB;gBACzB,WAAW,EAAE,8DAA8D;gBAC3E,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE;aACzD;SACD;QACD,OAAO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EAAE,WAAW,EAAE,EAAE;aAC9E;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customerDescription = void 0;
|
|
4
|
+
const getMany_1 = require("../shared/getMany");
|
|
5
|
+
const show = (operation) => ({ show: { resource: ['customer'], operation } });
|
|
6
|
+
const BOTH_MUST_MATCH = 'Matches customers whose email and phone both match. Map one of the two.';
|
|
7
|
+
exports.customerDescription = [
|
|
8
|
+
{
|
|
9
|
+
displayName: 'Operation',
|
|
10
|
+
name: 'operation',
|
|
11
|
+
type: 'options',
|
|
12
|
+
noDataExpression: true,
|
|
13
|
+
displayOptions: { show: { resource: ['customer'] } },
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
name: 'Create',
|
|
17
|
+
value: 'create',
|
|
18
|
+
action: 'Create a customer',
|
|
19
|
+
description: 'Create a customer',
|
|
20
|
+
routing: { request: { method: 'POST', url: '/customers' } },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Many',
|
|
24
|
+
value: 'getAll',
|
|
25
|
+
action: 'Get many customers',
|
|
26
|
+
description: 'Get many customers, newest first',
|
|
27
|
+
routing: {
|
|
28
|
+
request: { method: 'GET', url: '/customers' },
|
|
29
|
+
send: { paginate: true },
|
|
30
|
+
operations: { pagination: getMany_1.paginateByCursor },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
default: 'create',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Name',
|
|
38
|
+
name: 'name',
|
|
39
|
+
type: 'string',
|
|
40
|
+
default: '',
|
|
41
|
+
displayOptions: show(['create']),
|
|
42
|
+
routing: { send: { type: 'body', property: 'name' } },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Email',
|
|
46
|
+
name: 'email',
|
|
47
|
+
type: 'string',
|
|
48
|
+
placeholder: 'name@email.com',
|
|
49
|
+
default: '',
|
|
50
|
+
displayOptions: show(['create']),
|
|
51
|
+
routing: { send: { type: 'body', property: 'email' } },
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Phone',
|
|
55
|
+
name: 'phone',
|
|
56
|
+
type: 'string',
|
|
57
|
+
default: '',
|
|
58
|
+
displayOptions: show(['create']),
|
|
59
|
+
routing: { send: { type: 'body', property: 'phone' } },
|
|
60
|
+
},
|
|
61
|
+
...(0, getMany_1.getManyFields)('customer'),
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Filters',
|
|
64
|
+
name: 'filters',
|
|
65
|
+
type: 'collection',
|
|
66
|
+
placeholder: 'Add Filter',
|
|
67
|
+
default: {},
|
|
68
|
+
displayOptions: show(['getAll']),
|
|
69
|
+
options: [
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Email',
|
|
72
|
+
name: 'email',
|
|
73
|
+
type: 'string',
|
|
74
|
+
placeholder: 'name@email.com',
|
|
75
|
+
default: '',
|
|
76
|
+
description: BOTH_MUST_MATCH,
|
|
77
|
+
routing: { send: { type: 'query', property: 'email' } },
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
displayName: 'Phone',
|
|
81
|
+
name: 'phone',
|
|
82
|
+
type: 'string',
|
|
83
|
+
default: '',
|
|
84
|
+
description: BOTH_MUST_MATCH,
|
|
85
|
+
routing: { send: { type: 'query', property: 'phone' } },
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
//# sourceMappingURL=customer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../../../nodes/Storelink/resources/customer.ts"],"names":[],"mappings":";;;AAAA,+CAAoE;AAGpE,MAAM,IAAI,GAAG,CAAC,SAAmB,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,UA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