@heines/n8n-nodes-pax8 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/README.md +53 -0
- package/dist/credentials/Pax8ApiToken.credentials.d.ts +7 -0
- package/dist/credentials/Pax8ApiToken.credentials.js +29 -0
- package/dist/credentials/Pax8OAuth2Api.credentials.d.ts +8 -0
- package/dist/credentials/Pax8OAuth2Api.credentials.js +63 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/nodes/Pax8/Pax8.node.d.ts +37 -0
- package/dist/nodes/Pax8/Pax8.node.js +3198 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @heines/n8n-nodes-pax8
|
|
2
|
+
|
|
3
|
+
Community node for the **Pax8 Partner API**.
|
|
4
|
+
|
|
5
|
+
This package contains:
|
|
6
|
+
- **Pax8** node (common resources + a generic *API Request* operation)
|
|
7
|
+
- **Pax8 OAuth2 (Client Credentials)** credential (recommended)
|
|
8
|
+
- **Pax8 API Token** credential (paste an access token)
|
|
9
|
+
|
|
10
|
+
> Generated from the provided OpenAPI spec (`nodes/Pax8/openapi.json`).
|
|
11
|
+
|
|
12
|
+
## Installation (n8n)
|
|
13
|
+
|
|
14
|
+
### Community nodes (recommended)
|
|
15
|
+
1. In n8n: **Settings → Community Nodes**
|
|
16
|
+
2. Install: `@heines/n8n-nodes-pax8`
|
|
17
|
+
|
|
18
|
+
### Manual
|
|
19
|
+
```bash
|
|
20
|
+
npm install @heines/n8n-nodes-pax8
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Credentials
|
|
24
|
+
|
|
25
|
+
### OAuth2 (Client Credentials)
|
|
26
|
+
Use the **Pax8 OAuth2 (Client Credentials)** credential:
|
|
27
|
+
- Client ID / Client Secret
|
|
28
|
+
- Token URL: `https://token-manager.pax8.com/oauth/token`
|
|
29
|
+
- Audience: `https://api.pax8.com`
|
|
30
|
+
|
|
31
|
+
### Access Token
|
|
32
|
+
If you already have an access token, use **Pax8 API Token** and paste it.
|
|
33
|
+
|
|
34
|
+
## Node usage
|
|
35
|
+
|
|
36
|
+
### Generic API request
|
|
37
|
+
Use **Resource: API → Operation: Request** to call *any* endpoint in the OpenAPI spec.
|
|
38
|
+
- Endpoint supports `{param}` placeholders (e.g. `/companies/{companyId}`) + Path Parameters.
|
|
39
|
+
- Query Parameters and JSON Body supported.
|
|
40
|
+
|
|
41
|
+
### Included shortcuts
|
|
42
|
+
A first set of common shortcuts is included:
|
|
43
|
+
- Companies, Contacts, Products, Orders, Subscriptions, Invoices, Usage Summaries, Provisioners
|
|
44
|
+
|
|
45
|
+
## Development
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install
|
|
49
|
+
npm run build
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Disclaimer
|
|
53
|
+
This is an unofficial community node. Pax8 is a trademark of Pax8, Inc.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Pax8ApiToken = void 0;
|
|
4
|
+
class Pax8ApiToken {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'pax8ApiToken';
|
|
7
|
+
this.displayName = 'Pax8 API Token';
|
|
8
|
+
this.documentationUrl = 'https://developer.pax8.com/'; // adjust if different
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Access Token',
|
|
12
|
+
name: 'accessToken',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'Bearer access token for the Pax8 API.',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Base URL',
|
|
21
|
+
name: 'baseUrl',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: 'https://api.pax8.com',
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.Pax8ApiToken = Pax8ApiToken;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Pax8OAuth2Api = void 0;
|
|
4
|
+
class Pax8OAuth2Api {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'pax8OAuth2Api';
|
|
7
|
+
this.displayName = 'Pax8 OAuth2 (Client Credentials)';
|
|
8
|
+
this.documentationUrl = 'https://developer.pax8.com/'; // adjust if different
|
|
9
|
+
this.extends = ['oAuth2Api'];
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Client ID',
|
|
13
|
+
name: 'clientId',
|
|
14
|
+
type: 'string',
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Client Secret',
|
|
20
|
+
name: 'clientSecret',
|
|
21
|
+
type: 'string',
|
|
22
|
+
typeOptions: { password: true },
|
|
23
|
+
default: '',
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Token URL',
|
|
28
|
+
name: 'accessTokenUrl',
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: 'https://token-manager.pax8.com/oauth/token',
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Audience',
|
|
35
|
+
name: 'audience',
|
|
36
|
+
type: 'string',
|
|
37
|
+
default: 'https://api.pax8.com',
|
|
38
|
+
description: 'Pax8 API audience to request in the token call.',
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Scope',
|
|
43
|
+
name: 'scope',
|
|
44
|
+
type: 'string',
|
|
45
|
+
default: '',
|
|
46
|
+
description: 'Optional. Leave blank unless Pax8 provided you scopes.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Grant Type',
|
|
50
|
+
name: 'grantType',
|
|
51
|
+
type: 'hidden',
|
|
52
|
+
default: 'clientCredentials',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
displayName: 'Authentication',
|
|
56
|
+
name: 'authentication',
|
|
57
|
+
type: 'hidden',
|
|
58
|
+
default: 'body',
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.Pax8OAuth2Api = Pax8OAuth2Api;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./nodes/Pax8/Pax8.node"), exports);
|
|
18
|
+
__exportStar(require("./credentials/Pax8OAuth2Api.credentials"), exports);
|
|
19
|
+
__exportStar(require("./credentials/Pax8ApiToken.credentials"), exports);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, ILoadOptionsFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare class Pax8 implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getCompanies(this: ILoadOptionsFunctions): Promise<{
|
|
7
|
+
name: string;
|
|
8
|
+
value: any;
|
|
9
|
+
}[]>;
|
|
10
|
+
getProducts(this: ILoadOptionsFunctions): Promise<{
|
|
11
|
+
name: string;
|
|
12
|
+
value: any;
|
|
13
|
+
}[]>;
|
|
14
|
+
getSubscriptions(this: ILoadOptionsFunctions): Promise<{
|
|
15
|
+
name: string;
|
|
16
|
+
value: any;
|
|
17
|
+
}[]>;
|
|
18
|
+
getInvoices(this: ILoadOptionsFunctions): Promise<{
|
|
19
|
+
name: string;
|
|
20
|
+
value: any;
|
|
21
|
+
}[]>;
|
|
22
|
+
getQuotes(this: ILoadOptionsFunctions): Promise<{
|
|
23
|
+
name: string;
|
|
24
|
+
value: any;
|
|
25
|
+
}[]>;
|
|
26
|
+
getWebhooks(this: ILoadOptionsFunctions): Promise<{
|
|
27
|
+
name: string;
|
|
28
|
+
value: any;
|
|
29
|
+
}[]>;
|
|
30
|
+
getContacts(this: ILoadOptionsFunctions): Promise<{
|
|
31
|
+
name: string;
|
|
32
|
+
value: any;
|
|
33
|
+
}[]>;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
37
|
+
}
|