n8n-nodes-planvortex 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 +21 -0
- package/README.md +115 -0
- package/dist/credentials/PlanVortexOAuth2Api.credentials.d.ts +13 -0
- package/dist/credentials/PlanVortexOAuth2Api.credentials.js +62 -0
- package/dist/credentials/PlanVortexOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/planvortex.dark.svg +13 -0
- package/dist/credentials/planvortex.svg +13 -0
- package/dist/nodes/PlanVortex/PlanVortex.node.d.ts +15 -0
- package/dist/nodes/PlanVortex/PlanVortex.node.js +133 -0
- package/dist/nodes/PlanVortex/PlanVortex.node.js.map +1 -0
- package/dist/nodes/PlanVortex/PlanVortex.node.json +18 -0
- package/dist/nodes/PlanVortex/methods/loadOptions.d.ts +6 -0
- package/dist/nodes/PlanVortex/methods/loadOptions.js +63 -0
- package/dist/nodes/PlanVortex/methods/loadOptions.js.map +1 -0
- package/dist/nodes/PlanVortex/planvortex.dark.svg +13 -0
- package/dist/nodes/PlanVortex/planvortex.svg +13 -0
- package/dist/nodes/PlanVortex/resources/account/connectLink.d.ts +4 -0
- package/dist/nodes/PlanVortex/resources/account/connectLink.js +44 -0
- package/dist/nodes/PlanVortex/resources/account/connectLink.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/account/getAll.d.ts +4 -0
- package/dist/nodes/PlanVortex/resources/account/getAll.js +82 -0
- package/dist/nodes/PlanVortex/resources/account/getAll.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/account/index.d.ts +3 -0
- package/dist/nodes/PlanVortex/resources/account/index.js +36 -0
- package/dist/nodes/PlanVortex/resources/account/index.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/comment/getAll.d.ts +4 -0
- package/dist/nodes/PlanVortex/resources/comment/getAll.js +111 -0
- package/dist/nodes/PlanVortex/resources/comment/getAll.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/comment/index.d.ts +3 -0
- package/dist/nodes/PlanVortex/resources/comment/index.js +36 -0
- package/dist/nodes/PlanVortex/resources/comment/index.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/comment/reply.d.ts +4 -0
- package/dist/nodes/PlanVortex/resources/comment/reply.js +39 -0
- package/dist/nodes/PlanVortex/resources/comment/reply.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/common.d.ts +2 -0
- package/dist/nodes/PlanVortex/resources/common.js +20 -0
- package/dist/nodes/PlanVortex/resources/common.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/helpers.d.ts +11 -0
- package/dist/nodes/PlanVortex/resources/helpers.js +56 -0
- package/dist/nodes/PlanVortex/resources/helpers.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/media/index.d.ts +3 -0
- package/dist/nodes/PlanVortex/resources/media/index.js +26 -0
- package/dist/nodes/PlanVortex/resources/media/index.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/media/upload.d.ts +4 -0
- package/dist/nodes/PlanVortex/resources/media/upload.js +54 -0
- package/dist/nodes/PlanVortex/resources/media/upload.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/publication/create.d.ts +4 -0
- package/dist/nodes/PlanVortex/resources/publication/create.js +143 -0
- package/dist/nodes/PlanVortex/resources/publication/create.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/publication/index.d.ts +3 -0
- package/dist/nodes/PlanVortex/resources/publication/index.js +26 -0
- package/dist/nodes/PlanVortex/resources/publication/index.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/socialNetwork/getCapabilities.d.ts +2 -0
- package/dist/nodes/PlanVortex/resources/socialNetwork/getCapabilities.js +13 -0
- package/dist/nodes/PlanVortex/resources/socialNetwork/getCapabilities.js.map +1 -0
- package/dist/nodes/PlanVortex/resources/socialNetwork/index.d.ts +3 -0
- package/dist/nodes/PlanVortex/resources/socialNetwork/index.js +25 -0
- package/dist/nodes/PlanVortex/resources/socialNetwork/index.js.map +1 -0
- package/dist/nodes/PlanVortex/transport/errors.d.ts +11 -0
- package/dist/nodes/PlanVortex/transport/errors.generated.d.ts +12 -0
- package/dist/nodes/PlanVortex/transport/errors.generated.js +54 -0
- package/dist/nodes/PlanVortex/transport/errors.generated.js.map +1 -0
- package/dist/nodes/PlanVortex/transport/errors.js +106 -0
- package/dist/nodes/PlanVortex/transport/errors.js.map +1 -0
- package/dist/nodes/PlanVortex/transport/index.d.ts +5 -0
- package/dist/nodes/PlanVortex/transport/index.js +110 -0
- package/dist/nodes/PlanVortex/transport/index.js.map +1 -0
- package/dist/package.json +81 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +81 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Talia Softworks
|
|
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,115 @@
|
|
|
1
|
+
# n8n-nodes-planvortex
|
|
2
|
+
|
|
3
|
+
An n8n community node for [PlanVortex](https://planvortex.com/en). It lets an n8n workflow publish
|
|
4
|
+
to social networks, upload media, read and reply to comments, and hand a client a link to connect
|
|
5
|
+
their own accounts.
|
|
6
|
+
|
|
7
|
+
PlanVortex manages thirteen social networks from one API — Facebook, Instagram, Threads, LinkedIn,
|
|
8
|
+
TikTok, X, WhatsApp, YouTube, Google Business, Bluesky, Discord, Telegram and Slack. The ones worth
|
|
9
|
+
naming here are the last three: announcing a release on LinkedIn, dropping it in a customer Discord
|
|
10
|
+
and posting it to an internal Slack channel is normally three separate integrations.
|
|
11
|
+
|
|
12
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/)
|
|
13
|
+
workflow automation platform.
|
|
14
|
+
|
|
15
|
+
> **Status: verification by n8n pending.** Until n8n verifies this node it can be installed on a
|
|
16
|
+
> **self-hosted** n8n only, not on n8n Cloud. On Cloud, in the meantime, PlanVortex works through
|
|
17
|
+
> the `HTTP Request` node against the [REST API](https://planvortex.com/en/developers).
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
**Self-hosted n8n:** go to **Settings → Community Nodes**, choose **Install** and enter
|
|
22
|
+
`n8n-nodes-planvortex`. The [installation
|
|
23
|
+
guide](https://docs.n8n.io/integrations/community-nodes/installation/) covers the other ways,
|
|
24
|
+
including the command line.
|
|
25
|
+
|
|
26
|
+
**n8n Cloud:** once n8n has verified the node, the instance **owner or an admin** installs it from
|
|
27
|
+
the nodes panel. Nobody else on the instance can.
|
|
28
|
+
|
|
29
|
+
## Operations
|
|
30
|
+
|
|
31
|
+
| Resource | Operation | What it does |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| Publication | Create | Publishes now or schedules a post on one connected account |
|
|
34
|
+
| Media | Upload | Puts an image or a video in the organization's library, ready to attach |
|
|
35
|
+
| Account | Get Many | Lists the connected accounts, with a filter for what their network can do |
|
|
36
|
+
| Account | Create Connect Link | Mints a single-use link for a person to connect one of their own accounts |
|
|
37
|
+
| Comment | Get Many | Reads the comment and review inbox |
|
|
38
|
+
| Comment | Reply | Publishes a public reply to a comment or a review |
|
|
39
|
+
| Social Network | Get Capabilities | Says what every network supports, one item per network |
|
|
40
|
+
|
|
41
|
+
The organization and the account are **dropdowns**, filled from your own account: nothing here
|
|
42
|
+
asks you to paste an id. Both still accept an expression when the id comes from an earlier node.
|
|
43
|
+
|
|
44
|
+
Seven operations, not one hundred and thirty-five. Anything else the API does is one `HTTP Request`
|
|
45
|
+
node away, using the same credential — see the [PlanVortex API
|
|
46
|
+
documentation](https://planvortex.com/en/developers).
|
|
47
|
+
|
|
48
|
+
Four things are worth knowing before you build on them:
|
|
49
|
+
|
|
50
|
+
- **Connecting a social account cannot be automated.** It is an OAuth flow with a person clicking
|
|
51
|
+
"authorize" on the network's own screen, and app credentials are refused outright. *Create
|
|
52
|
+
Connect Link* gives you a link that lasts fifteen minutes and connects one account; send your
|
|
53
|
+
user to it and watch the accounts listing for the result.
|
|
54
|
+
- **An invalid post is not an error.** PlanVortex stores it in state `withErrors`, with the reasons
|
|
55
|
+
inside it, and answers 200 — so a workflow that only watches for exceptions would report a post
|
|
56
|
+
that never went out as sent. *Create* has a **Fail on Publication Errors** toggle, on by default,
|
|
57
|
+
that turns it into a real failure.
|
|
58
|
+
- **Not every network does everything.** Google Business receives reviews and never publishes,
|
|
59
|
+
WhatsApp has no feed, Slack publishes and has no comment inbox at all. *Get Capabilities* is how
|
|
60
|
+
a workflow finds that out once instead of one network at a time, in production. The account
|
|
61
|
+
dropdown for publishing already hides the accounts that cannot publish.
|
|
62
|
+
- **Comments and replies need a paid plan.** The rest of this node works on the free one.
|
|
63
|
+
|
|
64
|
+
## Credentials
|
|
65
|
+
|
|
66
|
+
You need a PlanVortex account and an **app** (API credentials), which you create in the PlanVortex
|
|
67
|
+
panel. An app gives you a `client_id` and a `client_secret`; the node exchanges them for an access
|
|
68
|
+
token using the OAuth 2.0 client-credentials grant, and n8n caches that token for you.
|
|
69
|
+
|
|
70
|
+
Create a **PlanVortex OAuth2 API** credential in n8n and fill in three fields:
|
|
71
|
+
|
|
72
|
+
| Field | What goes in it |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| Base URL | `https://api.planvortex.com/v1.0.0` — leave it alone unless you were given another environment |
|
|
75
|
+
| Client ID | the app's `client_id` |
|
|
76
|
+
| Client Secret | the app's `client_secret` |
|
|
77
|
+
|
|
78
|
+
There is no "Connect" button and there should not be one: the client-credentials grant has no
|
|
79
|
+
consent screen. Use **Test** instead — it performs the real token exchange and reads back the
|
|
80
|
+
clients and organizations the app can see.
|
|
81
|
+
|
|
82
|
+
Apps are available on all PlanVortex plans, including the free one.
|
|
83
|
+
|
|
84
|
+
Note that **comments and comment replies require a paid plan**. A workflow built on a free plan
|
|
85
|
+
will publish happily and fail on the comment steps.
|
|
86
|
+
|
|
87
|
+
## Errors
|
|
88
|
+
|
|
89
|
+
PlanVortex answers a **numbered error code**, and the number is what says what happened — not the
|
|
90
|
+
HTTP status. Almost everything arrives as a 400: an expired token, a disconnected account, a text
|
|
91
|
+
that is too long and a plan that does not include the feature are all 400s, and only rate limits
|
|
92
|
+
(429) and permissions (401) differ.
|
|
93
|
+
|
|
94
|
+
So the node shows you two lines: the API's own message, and underneath it what to do about that
|
|
95
|
+
particular code. They are different things for codes that sit next to each other — 516 means the
|
|
96
|
+
account is on the free plan, 519 means the call can never be made with app credentials, and 520
|
|
97
|
+
means the app is missing a permission and names which one. The code itself is in the second line,
|
|
98
|
+
which is what to quote if you ask support.
|
|
99
|
+
|
|
100
|
+
Turning on **Continue On Fail** is worth it for any workflow that touches several accounts: one
|
|
101
|
+
disconnected account then costs you that item instead of the whole run.
|
|
102
|
+
|
|
103
|
+
## Compatibility
|
|
104
|
+
|
|
105
|
+
Requires Node.js 20 or newer. Built and unit-tested against `n8n-workflow` 2.x, the library n8n 2
|
|
106
|
+
runs on.
|
|
107
|
+
|
|
108
|
+
## Resources
|
|
109
|
+
|
|
110
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
111
|
+
- [PlanVortex API documentation](https://planvortex.com/en/developers)
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
[MIT](LICENSE.md)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class PlanVortexOAuth2Api implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
extends: string[];
|
|
5
|
+
icon: {
|
|
6
|
+
readonly light: "file:planvortex.svg";
|
|
7
|
+
readonly dark: "file:planvortex.dark.svg";
|
|
8
|
+
};
|
|
9
|
+
displayName: string;
|
|
10
|
+
documentationUrl: string;
|
|
11
|
+
properties: INodeProperties[];
|
|
12
|
+
test: ICredentialTestRequest;
|
|
13
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlanVortexOAuth2Api = void 0;
|
|
4
|
+
class PlanVortexOAuth2Api {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'planVortexOAuth2Api';
|
|
7
|
+
this.extends = ['oAuth2Api'];
|
|
8
|
+
this.icon = { light: 'file:planvortex.svg', dark: 'file:planvortex.dark.svg' };
|
|
9
|
+
this.displayName = 'PlanVortex OAuth2 API';
|
|
10
|
+
this.documentationUrl = 'https://github.com/taliasoftworks/n8n-nodes-planvortex?tab=readme-ov-file#credentials';
|
|
11
|
+
this.properties = [
|
|
12
|
+
{
|
|
13
|
+
displayName: 'Base URL',
|
|
14
|
+
name: 'baseUrl',
|
|
15
|
+
type: 'string',
|
|
16
|
+
default: 'https://api.planvortex.com/v1.0.0',
|
|
17
|
+
required: true,
|
|
18
|
+
placeholder: 'https://api.planvortex.com/v1.0.0',
|
|
19
|
+
description: 'Root of the PlanVortex API, version segment included. Leave the default unless you were given another environment.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Grant Type',
|
|
23
|
+
name: 'grantType',
|
|
24
|
+
type: 'hidden',
|
|
25
|
+
default: 'clientCredentials',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Access Token URL',
|
|
29
|
+
name: 'accessTokenUrl',
|
|
30
|
+
type: 'hidden',
|
|
31
|
+
default: '={{$self["baseUrl"].endsWith("/") ? $self["baseUrl"].slice(0, -1) : $self["baseUrl"]}}/oauth/token',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Scope',
|
|
35
|
+
name: 'scope',
|
|
36
|
+
type: 'hidden',
|
|
37
|
+
default: '',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Auth URI Query Parameters',
|
|
41
|
+
name: 'authQueryParameters',
|
|
42
|
+
type: 'hidden',
|
|
43
|
+
default: '',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Authentication',
|
|
47
|
+
name: 'authentication',
|
|
48
|
+
type: 'hidden',
|
|
49
|
+
default: 'body',
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
this.test = {
|
|
53
|
+
request: {
|
|
54
|
+
baseURL: '={{$credentials.baseUrl.endsWith("/") ? $credentials.baseUrl.slice(0, -1) : $credentials.baseUrl}}',
|
|
55
|
+
url: '/clients_organizations',
|
|
56
|
+
method: 'GET',
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.PlanVortexOAuth2Api = PlanVortexOAuth2Api;
|
|
62
|
+
//# sourceMappingURL=PlanVortexOAuth2Api.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanVortexOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/PlanVortexOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAcA,MAAa,mBAAmB;IAAhC;QACC,SAAI,GAAG,qBAAqB,CAAC;QAE7B,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAKxB,SAAI,GAAG,EAAE,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,0BAA0B,EAAW,CAAC;QAEnF,gBAAW,GAAG,uBAAuB,CAAC;QAEtC,qBAAgB,GACf,uFAAuF,CAAC;QAEzF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mCAAmC;gBAC5C,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mCAAmC;gBAChD,WAAW,EACV,oHAAoH;aACrH;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC5B;YACD;gBAKC,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EACN,oGAAoG;aACrG;YACD;gBAMC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBAGC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM;aACf;SACD,CAAC;QAiBF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EACN,oGAAoG;gBACrG,GAAG,EAAE,wBAAwB;gBAC7B,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AA7FD,kDA6FC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512" role="img" aria-label="PlanVortex">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="pvN8nIconDark" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" stop-color="#5A78FF"/>
|
|
5
|
+
<stop offset="100%" stop-color="#FF6C90"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<g transform="translate(256,256) scale(13.5) translate(-18.55,-15.3)">
|
|
9
|
+
<path d="M16 3.2C23.1 3.2 28.8 8.9 28.8 16S23.9 27.4 17.8 27.4C12.5 27.4 8.3 23.2 8.3 17.9C8.3 13.5 11.8 10 16.2 10C19.6 10 22.4 12.8 22.4 16.2"
|
|
10
|
+
fill="none" stroke="url(#pvN8nIconDark)" stroke-width="3.1" stroke-linecap="round"/>
|
|
11
|
+
<circle cx="16.2" cy="16.2" r="1.9" fill="url(#pvN8nIconDark)"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512" role="img" aria-label="PlanVortex">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="pvN8nIconLight" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" stop-color="#2B4EFF"/>
|
|
5
|
+
<stop offset="100%" stop-color="#FF3D6E"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<g transform="translate(256,256) scale(13.5) translate(-18.55,-15.3)">
|
|
9
|
+
<path d="M16 3.2C23.1 3.2 28.8 8.9 28.8 16S23.9 27.4 17.8 27.4C12.5 27.4 8.3 23.2 8.3 17.9C8.3 13.5 11.8 10 16.2 10C19.6 10 22.4 12.8 22.4 16.2"
|
|
10
|
+
fill="none" stroke="url(#pvN8nIconLight)" stroke-width="3.1" stroke-linecap="round"/>
|
|
11
|
+
<circle cx="16.2" cy="16.2" r="1.9" fill="url(#pvN8nIconLight)"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type IExecuteFunctions, type INodeExecutionData, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
import { getAccounts as loadAccountOptions, getCommentNetworks, getOrganizations, getPublishingAccounts, getSocialNetworks } from './methods/loadOptions';
|
|
3
|
+
export declare class PlanVortex implements INodeType {
|
|
4
|
+
description: INodeTypeDescription;
|
|
5
|
+
methods: {
|
|
6
|
+
loadOptions: {
|
|
7
|
+
getAccounts: typeof loadAccountOptions;
|
|
8
|
+
getCommentNetworks: typeof getCommentNetworks;
|
|
9
|
+
getOrganizations: typeof getOrganizations;
|
|
10
|
+
getPublishingAccounts: typeof getPublishingAccounts;
|
|
11
|
+
getSocialNetworks: typeof getSocialNetworks;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlanVortex = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const loadOptions_1 = require("./methods/loadOptions");
|
|
6
|
+
const common_1 = require("./resources/common");
|
|
7
|
+
const helpers_1 = require("./resources/helpers");
|
|
8
|
+
const account_1 = require("./resources/account");
|
|
9
|
+
const connectLink_1 = require("./resources/account/connectLink");
|
|
10
|
+
const getAll_1 = require("./resources/account/getAll");
|
|
11
|
+
const comment_1 = require("./resources/comment");
|
|
12
|
+
const getAll_2 = require("./resources/comment/getAll");
|
|
13
|
+
const reply_1 = require("./resources/comment/reply");
|
|
14
|
+
const media_1 = require("./resources/media");
|
|
15
|
+
const upload_1 = require("./resources/media/upload");
|
|
16
|
+
const publication_1 = require("./resources/publication");
|
|
17
|
+
const create_1 = require("./resources/publication/create");
|
|
18
|
+
const socialNetwork_1 = require("./resources/socialNetwork");
|
|
19
|
+
const getCapabilities_1 = require("./resources/socialNetwork/getCapabilities");
|
|
20
|
+
const OPERATIONS = {
|
|
21
|
+
'account:connectLink': connectLink_1.createConnectLink,
|
|
22
|
+
'account:getAll': getAll_1.getAccounts,
|
|
23
|
+
'comment:getAll': getAll_2.getComments,
|
|
24
|
+
'comment:reply': reply_1.replyToComment,
|
|
25
|
+
'media:upload': upload_1.uploadMedia,
|
|
26
|
+
'publication:create': create_1.createPublication,
|
|
27
|
+
'socialNetwork:getCapabilities': getCapabilities_1.getSocialCapabilities,
|
|
28
|
+
};
|
|
29
|
+
class PlanVortex {
|
|
30
|
+
constructor() {
|
|
31
|
+
this.description = {
|
|
32
|
+
displayName: 'PlanVortex',
|
|
33
|
+
name: 'planVortex',
|
|
34
|
+
icon: { light: 'file:planvortex.svg', dark: 'file:planvortex.dark.svg' },
|
|
35
|
+
group: ['transform'],
|
|
36
|
+
version: 1,
|
|
37
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
38
|
+
description: 'Publish to social networks, upload media and work the comment inbox',
|
|
39
|
+
defaults: {
|
|
40
|
+
name: 'PlanVortex',
|
|
41
|
+
},
|
|
42
|
+
usableAsTool: true,
|
|
43
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
44
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
45
|
+
credentials: [{ name: 'planVortexOAuth2Api', required: true }],
|
|
46
|
+
properties: [
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Resource',
|
|
49
|
+
name: 'resource',
|
|
50
|
+
type: 'options',
|
|
51
|
+
noDataExpression: true,
|
|
52
|
+
options: [
|
|
53
|
+
{
|
|
54
|
+
name: 'Account',
|
|
55
|
+
value: 'account',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'Comment',
|
|
59
|
+
value: 'comment',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Media',
|
|
63
|
+
value: 'media',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Publication',
|
|
67
|
+
value: 'publication',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Social Network',
|
|
71
|
+
value: 'socialNetwork',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
default: 'publication',
|
|
75
|
+
},
|
|
76
|
+
...account_1.accountOperations,
|
|
77
|
+
...comment_1.commentOperations,
|
|
78
|
+
...media_1.mediaOperations,
|
|
79
|
+
...publication_1.publicationOperations,
|
|
80
|
+
...socialNetwork_1.socialNetworkOperations,
|
|
81
|
+
common_1.organizationIdProperty,
|
|
82
|
+
...account_1.accountFields,
|
|
83
|
+
...comment_1.commentFields,
|
|
84
|
+
...media_1.mediaFields,
|
|
85
|
+
...publication_1.publicationFields,
|
|
86
|
+
...socialNetwork_1.socialNetworkFields,
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
this.methods = {
|
|
90
|
+
loadOptions: {
|
|
91
|
+
getAccounts: loadOptions_1.getAccounts,
|
|
92
|
+
getCommentNetworks: loadOptions_1.getCommentNetworks,
|
|
93
|
+
getOrganizations: loadOptions_1.getOrganizations,
|
|
94
|
+
getPublishingAccounts: loadOptions_1.getPublishingAccounts,
|
|
95
|
+
getSocialNetworks: loadOptions_1.getSocialNetworks,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
async execute() {
|
|
100
|
+
const items = this.getInputData();
|
|
101
|
+
const returnData = [];
|
|
102
|
+
const run = (0, helpers_1.newRunState)();
|
|
103
|
+
for (let i = 0; i < items.length; i++) {
|
|
104
|
+
const resource = this.getNodeParameter('resource', i);
|
|
105
|
+
const operation = this.getNodeParameter('operation', i);
|
|
106
|
+
try {
|
|
107
|
+
const handler = OPERATIONS[`${resource}:${operation}`];
|
|
108
|
+
if (handler === undefined) {
|
|
109
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported on "${resource}"`, { itemIndex: i });
|
|
110
|
+
}
|
|
111
|
+
const results = await handler.call(this, i, run);
|
|
112
|
+
for (const result of results) {
|
|
113
|
+
returnData.push({ json: result, pairedItem: { item: i } });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
if (this.continueOnFail()) {
|
|
118
|
+
returnData.push({
|
|
119
|
+
json: { error: error.message },
|
|
120
|
+
pairedItem: { item: i },
|
|
121
|
+
});
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
throw error instanceof n8n_workflow_1.NodeApiError || error instanceof n8n_workflow_1.NodeOperationError
|
|
125
|
+
? error
|
|
126
|
+
: new n8n_workflow_1.NodeApiError(this.getNode(), error, { itemIndex: i });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return [returnData];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.PlanVortex = PlanVortex;
|
|
133
|
+
//# sourceMappingURL=PlanVortex.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlanVortex.node.js","sourceRoot":"","sources":["../../../nodes/PlanVortex/PlanVortex.node.ts"],"names":[],"mappings":";;;AAAA,+CASsB;AACtB,uDAM+B;AAC/B,+CAA4D;AAC5D,iDAAyE;AACzE,iDAAuE;AACvE,iEAAoE;AACpE,uDAAyD;AACzD,iDAAuE;AACvE,uDAAyD;AACzD,qDAA2D;AAC3D,6CAAiE;AACjE,qDAAuD;AACvD,yDAAmF;AACnF,2DAAmE;AACnE,6DAAyF;AACzF,+EAAkF;AAmBlF,MAAM,UAAU,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AAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;gBACjD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;oBAC9B,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC5D,CAAC;YACF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAGhB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE;wBACzC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;qBACvB,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBAMD,MAAM,KAAK,YAAY,2BAAY,IAAI,KAAK,YAAY,iCAAkB;oBACzE,CAAC,CAAC,KAAK;oBACP,CAAC,CAAC,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAmB,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YAC5E,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAzHD,gCAyHC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-planvortex.planVortex",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Marketing", "Communication"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/taliasoftworks/n8n-nodes-planvortex?tab=readme-ov-file#credentials"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/taliasoftworks/n8n-nodes-planvortex?tab=readme-ov-file"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export declare function getOrganizations(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
3
|
+
export declare function getAccounts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
4
|
+
export declare function getPublishingAccounts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
5
|
+
export declare function getSocialNetworks(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
6
|
+
export declare function getCommentNetworks(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOrganizations = getOrganizations;
|
|
4
|
+
exports.getAccounts = getAccounts;
|
|
5
|
+
exports.getPublishingAccounts = getPublishingAccounts;
|
|
6
|
+
exports.getSocialNetworks = getSocialNetworks;
|
|
7
|
+
exports.getCommentNetworks = getCommentNetworks;
|
|
8
|
+
const transport_1 = require("../transport");
|
|
9
|
+
const helpers_1 = require("../resources/helpers");
|
|
10
|
+
function sorted(options) {
|
|
11
|
+
return options.sort((a, b) => a.name.localeCompare(b.name));
|
|
12
|
+
}
|
|
13
|
+
async function getOrganizations() {
|
|
14
|
+
var _a, _b, _c, _d;
|
|
15
|
+
const response = (await transport_1.planVortexApiRequest.call(this, 'GET', '/clients_organizations', undefined, {
|
|
16
|
+
limit: 100,
|
|
17
|
+
limitOrganizations: 100,
|
|
18
|
+
}));
|
|
19
|
+
const clients = (_a = response === null || response === void 0 ? void 0 : response.clients) !== null && _a !== void 0 ? _a : [];
|
|
20
|
+
const options = [];
|
|
21
|
+
for (const client of clients) {
|
|
22
|
+
const organizations = (_b = client.organizations) !== null && _b !== void 0 ? _b : [];
|
|
23
|
+
for (const organization of organizations) {
|
|
24
|
+
const name = String((_c = organization.name) !== null && _c !== void 0 ? _c : organization._id);
|
|
25
|
+
options.push({
|
|
26
|
+
name: clients.length > 1 ? `${String((_d = client.name) !== null && _d !== void 0 ? _d : '')} — ${name}` : name,
|
|
27
|
+
value: String(organization._id),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return sorted(options);
|
|
32
|
+
}
|
|
33
|
+
async function getAccounts() {
|
|
34
|
+
return await loadAccounts(this);
|
|
35
|
+
}
|
|
36
|
+
async function getPublishingAccounts() {
|
|
37
|
+
return await loadAccounts(this, { capability: 'publications' });
|
|
38
|
+
}
|
|
39
|
+
async function loadAccounts(context, qs = {}) {
|
|
40
|
+
var _a;
|
|
41
|
+
const organizationId = String((_a = context.getCurrentNodeParameter('organizationId')) !== null && _a !== void 0 ? _a : '').trim();
|
|
42
|
+
if (organizationId === '')
|
|
43
|
+
return [];
|
|
44
|
+
const accounts = await transport_1.planVortexApiRequestAllItems.call(context, `/organizations/${organizationId}/accounts`, 'accounts', qs);
|
|
45
|
+
return sorted(accounts.map((account) => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
return ({
|
|
48
|
+
name: `${String((_a = account.name) !== null && _a !== void 0 ? _a : account._id)} (${(0, helpers_1.networkLabel)(String((_b = account.social_network) !== null && _b !== void 0 ? _b : ''))})`,
|
|
49
|
+
value: String(account._id),
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
async function getSocialNetworks() {
|
|
54
|
+
const networks = (await transport_1.planVortexApiRequest.call(this, 'GET', '/social_networks'));
|
|
55
|
+
return sorted((networks !== null && networks !== void 0 ? networks : []).map((network) => ({ name: (0, helpers_1.networkLabel)(network), value: network })));
|
|
56
|
+
}
|
|
57
|
+
async function getCommentNetworks() {
|
|
58
|
+
const capabilities = (await transport_1.planVortexApiRequest.call(this, 'GET', '/social_capabilities'));
|
|
59
|
+
return sorted(Object.entries(capabilities !== null && capabilities !== void 0 ? capabilities : {})
|
|
60
|
+
.filter(([, matrix]) => (matrix === null || matrix === void 0 ? void 0 : matrix.comments) === true)
|
|
61
|
+
.map(([network]) => ({ name: (0, helpers_1.networkLabel)(network), value: network })));
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=loadOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadOptions.js","sourceRoot":"","sources":["../../../../nodes/PlanVortex/methods/loadOptions.ts"],"names":[],"mappings":";;AA0BA,4CAuBC;AASD,kCAEC;AAUD,sDAIC;AA2BD,8CAOC;AAQD,gDAaC;AAhID,4CAAkF;AAClF,kDAAoD;AAapD,SAAS,MAAM,CAAC,OAA+B;IAC9C,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC;AASM,KAAK,UAAU,gBAAgB;;IAGrC,MAAM,QAAQ,GAAG,CAAC,MAAM,gCAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE;QACnG,KAAK,EAAE,GAAG;QACV,kBAAkB,EAAE,GAAG;KACvB,CAAC,CAAgC,CAAC;IAEnC,MAAM,OAAO,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,mCAAI,EAAE,CAAC;IACxC,MAAM,OAAO,GAA2B,EAAE,CAAC;IAE3C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC9B,MAAM,aAAa,GAAG,MAAC,MAAM,CAAC,aAA2C,mCAAI,EAAE,CAAC;QAChF,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;YAC1C,MAAM,IAAI,GAAG,MAAM,C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
|
+
<linearGradient id="pvN8nIconDark" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" stop-color="#5A78FF"/>
|
|
5
|
+
<stop offset="100%" stop-color="#FF6C90"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<g transform="translate(256,256) scale(13.5) translate(-18.55,-15.3)">
|
|
9
|
+
<path d="M16 3.2C23.1 3.2 28.8 8.9 28.8 16S23.9 27.4 17.8 27.4C12.5 27.4 8.3 23.2 8.3 17.9C8.3 13.5 11.8 10 16.2 10C19.6 10 22.4 12.8 22.4 16.2"
|
|
10
|
+
fill="none" stroke="url(#pvN8nIconDark)" stroke-width="3.1" stroke-linecap="round"/>
|
|
11
|
+
<circle cx="16.2" cy="16.2" r="1.9" fill="url(#pvN8nIconDark)"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512" role="img" aria-label="PlanVortex">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="pvN8nIconLight" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" stop-color="#2B4EFF"/>
|
|
5
|
+
<stop offset="100%" stop-color="#FF3D6E"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<g transform="translate(256,256) scale(13.5) translate(-18.55,-15.3)">
|
|
9
|
+
<path d="M16 3.2C23.1 3.2 28.8 8.9 28.8 16S23.9 27.4 17.8 27.4C12.5 27.4 8.3 23.2 8.3 17.9C8.3 13.5 11.8 10 16.2 10C19.6 10 22.4 12.8 22.4 16.2"
|
|
10
|
+
fill="none" stroke="url(#pvN8nIconLight)" stroke-width="3.1" stroke-linecap="round"/>
|
|
11
|
+
<circle cx="16.2" cy="16.2" r="1.9" fill="url(#pvN8nIconLight)"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createConnectLink = exports.accountConnectLinkDescription = void 0;
|
|
4
|
+
const transport_1 = require("../../transport");
|
|
5
|
+
const helpers_1 = require("../helpers");
|
|
6
|
+
const showOnlyForAccountConnectLink = {
|
|
7
|
+
resource: ['account'],
|
|
8
|
+
operation: ['connectLink'],
|
|
9
|
+
};
|
|
10
|
+
exports.accountConnectLinkDescription = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Options',
|
|
13
|
+
name: 'options',
|
|
14
|
+
type: 'collection',
|
|
15
|
+
placeholder: 'Add Option',
|
|
16
|
+
default: {},
|
|
17
|
+
displayOptions: { show: showOnlyForAccountConnectLink },
|
|
18
|
+
options: [
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Redirect URI',
|
|
21
|
+
name: 'redirect_uri',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: '',
|
|
24
|
+
description: 'Where your user lands once they have finished connecting. It has to be one of the redirect URLs registered on your PlanVortex app, or the call answers error 532.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Social Network Name or ID',
|
|
28
|
+
name: 'social_network',
|
|
29
|
+
type: 'options',
|
|
30
|
+
typeOptions: { loadOptionsMethod: 'getSocialNetworks' },
|
|
31
|
+
default: '',
|
|
32
|
+
description: 'Bind the link to one network, so it can connect that one and nothing else. Leave it out to let the person choose. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
const createConnectLink = async function (index) {
|
|
38
|
+
const organizationId = (0, helpers_1.getOrganizationId)(this, index);
|
|
39
|
+
const options = this.getNodeParameter('options', index, {});
|
|
40
|
+
const response = (await transport_1.planVortexApiRequest.call(this, 'GET', `/organizations/${organizationId}/temporal_connect_token`, undefined, { ...options }));
|
|
41
|
+
return [response !== null && response !== void 0 ? response : {}];
|
|
42
|
+
};
|
|
43
|
+
exports.createConnectLink = createConnectLink;
|
|
44
|
+
//# sourceMappingURL=connectLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectLink.js","sourceRoot":"","sources":["../../../../../nodes/PlanVortex/resources/account/connectLink.ts"],"names":[],"mappings":";;;AACA,+CAAuD;AACvD,wCAAsE;AAEtE,MAAM,6BAA6B,GAAG;IACrC,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,aAAa,CAAC;CAC1B,CAAC;AAEW,QAAA,6BAA6B,GAAsB;IAC/D;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;QACvD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,mKAAmK;aACpK;YACD;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,EAAE,iBAAiB,EAAE,mBAAmB,EAAE;gBACvD,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,kOAAkO;aACnO;SACD;KACD;CACD,CAAC;AAeK,MAAM,iBAAiB,GAAqB,KAAK,WAAiB,KAAK;IAC7E,MAAM,cAAc,GAAG,IAAA,2BAAiB,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAgB,CAAC;IAE3E,MAAM,QAAQ,GAAG,CAAC,MAAM,gCAA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