@heines/n8n-nodes-pax8 1.0.4 → 1.0.5
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 +30 -31
- package/package.json +2 -38
- package/src/credentials/Pax8OAuth2Api.credentials.ts +1 -11
- package/src/index.ts +1 -26
- package/src/nodes/Pax8Sample.node.ts +1 -0
- package/tsconfig.json +1 -1
- package/dist/credentials/Pax8OAuth2Api.credentials.d.ts +0 -6
- package/dist/credentials/Pax8OAuth2Api.credentials.js +0 -15
- package/dist/index.d.ts +0 -27
- package/dist/index.js +0 -66
- package/dist/nodes/Pax8AccessToken.node.d.ts +0 -7
- package/dist/nodes/Pax8AccessToken.node.js +0 -33
- package/dist/nodes/Pax8Companies.node.d.ts +0 -7
- package/dist/nodes/Pax8Companies.node.js +0 -33
- package/dist/nodes/Pax8Contacts.node.d.ts +0 -7
- package/dist/nodes/Pax8Contacts.node.js +0 -33
- package/dist/nodes/Pax8Invoices.node.d.ts +0 -7
- package/dist/nodes/Pax8Invoices.node.js +0 -33
- package/dist/nodes/Pax8Libraryattachments.node.d.ts +0 -7
- package/dist/nodes/Pax8Libraryattachments.node.js +0 -33
- package/dist/nodes/Pax8Orders.node.d.ts +0 -7
- package/dist/nodes/Pax8Orders.node.js +0 -33
- package/dist/nodes/Pax8Preferenceattachments.node.d.ts +0 -7
- package/dist/nodes/Pax8Preferenceattachments.node.js +0 -33
- package/dist/nodes/Pax8Products.node.d.ts +0 -7
- package/dist/nodes/Pax8Products.node.js +0 -33
- package/dist/nodes/Pax8ProvisionAttempts.node.d.ts +0 -7
- package/dist/nodes/Pax8ProvisionAttempts.node.js +0 -33
- package/dist/nodes/Pax8ProvisionDetails.node.d.ts +0 -7
- package/dist/nodes/Pax8ProvisionDetails.node.js +0 -33
- package/dist/nodes/Pax8ProvisionRequests.node.d.ts +0 -7
- package/dist/nodes/Pax8ProvisionRequests.node.js +0 -33
- package/dist/nodes/Pax8ProvisionResults.node.d.ts +0 -7
- package/dist/nodes/Pax8ProvisionResults.node.js +0 -33
- package/dist/nodes/Pax8Provisioners.node.d.ts +0 -7
- package/dist/nodes/Pax8Provisioners.node.js +0 -33
- package/dist/nodes/Pax8ProvisioningSimulations.node.d.ts +0 -7
- package/dist/nodes/Pax8ProvisioningSimulations.node.js +0 -33
- package/dist/nodes/Pax8Quoteaccesslist.node.d.ts +0 -7
- package/dist/nodes/Pax8Quoteaccesslist.node.js +0 -33
- package/dist/nodes/Pax8Quoteattachments.node.d.ts +0 -7
- package/dist/nodes/Pax8Quoteattachments.node.js +0 -33
- package/dist/nodes/Pax8Quotelineitems.node.d.ts +0 -7
- package/dist/nodes/Pax8Quotelineitems.node.js +0 -33
- package/dist/nodes/Pax8Quotepreferences.node.d.ts +0 -7
- package/dist/nodes/Pax8Quotepreferences.node.js +0 -33
- package/dist/nodes/Pax8Quotes.node.d.ts +0 -7
- package/dist/nodes/Pax8Quotes.node.js +0 -33
- package/dist/nodes/Pax8Quotesections.node.d.ts +0 -7
- package/dist/nodes/Pax8Quotesections.node.js +0 -33
- package/dist/nodes/Pax8Subscriptions.node.d.ts +0 -7
- package/dist/nodes/Pax8Subscriptions.node.js +0 -33
- package/dist/nodes/Pax8TopicDefinitions.node.d.ts +0 -7
- package/dist/nodes/Pax8TopicDefinitions.node.js +0 -33
- package/dist/nodes/Pax8UsageLines.node.d.ts +0 -7
- package/dist/nodes/Pax8UsageLines.node.js +0 -33
- package/dist/nodes/Pax8UsageSummaries.node.d.ts +0 -7
- package/dist/nodes/Pax8UsageSummaries.node.js +0 -33
- package/dist/nodes/Pax8WebhookLogs.node.d.ts +0 -7
- package/dist/nodes/Pax8WebhookLogs.node.js +0 -33
- package/dist/nodes/Pax8Webhooks.node.d.ts +0 -7
- package/dist/nodes/Pax8Webhooks.node.js +0 -33
- package/src/nodes/Pax8AccessToken.node.ts +0 -27
- package/src/nodes/Pax8Companies.node.ts +0 -27
- package/src/nodes/Pax8Contacts.node.ts +0 -27
- package/src/nodes/Pax8Invoices.node.ts +0 -27
- package/src/nodes/Pax8Libraryattachments.node.ts +0 -27
- package/src/nodes/Pax8Orders.node.ts +0 -27
- package/src/nodes/Pax8Preferenceattachments.node.ts +0 -27
- package/src/nodes/Pax8Products.node.ts +0 -27
- package/src/nodes/Pax8ProvisionAttempts.node.ts +0 -27
- package/src/nodes/Pax8ProvisionDetails.node.ts +0 -27
- package/src/nodes/Pax8ProvisionRequests.node.ts +0 -27
- package/src/nodes/Pax8ProvisionResults.node.ts +0 -27
- package/src/nodes/Pax8Provisioners.node.ts +0 -27
- package/src/nodes/Pax8ProvisioningSimulations.node.ts +0 -27
- package/src/nodes/Pax8Quoteaccesslist.node.ts +0 -27
- package/src/nodes/Pax8Quoteattachments.node.ts +0 -27
- package/src/nodes/Pax8Quotelineitems.node.ts +0 -27
- package/src/nodes/Pax8Quotepreferences.node.ts +0 -27
- package/src/nodes/Pax8Quotes.node.ts +0 -27
- package/src/nodes/Pax8Quotesections.node.ts +0 -27
- package/src/nodes/Pax8Subscriptions.node.ts +0 -27
- package/src/nodes/Pax8TopicDefinitions.node.ts +0 -27
- package/src/nodes/Pax8UsageLines.node.ts +0 -27
- package/src/nodes/Pax8UsageSummaries.node.ts +0 -27
- package/src/nodes/Pax8WebhookLogs.node.ts +0 -27
- package/src/nodes/Pax8Webhooks.node.ts +0 -27
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Products = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Products {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Products', name: 'pax8Products', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Products', defaults: { name: 'Pax8 Products' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /products", "value": "get:/products" }, { "name": "GET /products/{productId}", "value": "get:/products/{productId}" }, { "name": "GET /products/{productId}/provision-details", "value": "get:/products/{productId}/provision-details" }, { "name": "GET /products/{productId}/dependencies", "value": "get:/products/{productId}/dependencies" }, { "name": "GET /products/{productId}/pricing", "value": "get:/products/{productId}/pricing" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Products = Pax8Products;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8ProvisionAttempts implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8ProvisionAttempts = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8ProvisionAttempts {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Provision Attempts', name: 'pax8ProvisionAttempts', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Provision Attempts', defaults: { name: 'Pax8 Provision Attempts' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /provision-requests/{provisionRequestId}/attempts", "value": "get:/provision-requests/{provisionRequestId}/attempts" }, { "name": "POST /provision-requests/{provisionRequestId}/attempts", "value": "post:/provision-requests/{provisionRequestId}/attempts" }, { "name": "GET /provision-requests/{provisionRequestId}/attempts/{provisionAttemptId}", "value": "get:/provision-requests/{provisionRequestId}/attempts/{provisionAttemptId}" }, { "name": "GET /provision-requests/{provisionRequestId}/attempts/latest", "value": "get:/provision-requests/{provisionRequestId}/attempts/latest" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8ProvisionAttempts = Pax8ProvisionAttempts;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8ProvisionDetails implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8ProvisionDetails = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8ProvisionDetails {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Provision Details', name: 'pax8ProvisionDetails', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Provision Details', defaults: { name: 'Pax8 Provision Details' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /provision-requests/{provisionRequestId}/details", "value": "get:/provision-requests/{provisionRequestId}/details" }, { "name": "GET /provision-requests/{provisionRequestId}/details/{provisionDetailId}", "value": "get:/provision-requests/{provisionRequestId}/details/{provisionDetailId}" }, { "name": "GET /provision-requests/{provisionRequestId}/details/latest", "value": "get:/provision-requests/{provisionRequestId}/details/latest" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8ProvisionDetails = Pax8ProvisionDetails;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8ProvisionRequests implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8ProvisionRequests = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8ProvisionRequests {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Provision Requests', name: 'pax8ProvisionRequests', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Provision Requests', defaults: { name: 'Pax8 Provision Requests' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /provision-requests", "value": "get:/provision-requests" }, { "name": "GET /provision-requests/{provisionRequestId}", "value": "get:/provision-requests/{provisionRequestId}" }, { "name": "GET /provision-requests/unfulfilled", "value": "get:/provision-requests/unfulfilled" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8ProvisionRequests = Pax8ProvisionRequests;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8ProvisionResults implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8ProvisionResults = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8ProvisionResults {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Provision Results', name: 'pax8ProvisionResults', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Provision Results', defaults: { name: 'Pax8 Provision Results' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /provision-requests/{provisionRequestId}/results", "value": "get:/provision-requests/{provisionRequestId}/results" }, { "name": "POST /provision-requests/{provisionRequestId}/results", "value": "post:/provision-requests/{provisionRequestId}/results" }, { "name": "GET /provision-requests/{provisionRequestId}/results/{provisionResultId}", "value": "get:/provision-requests/{provisionRequestId}/results/{provisionResultId}" }, { "name": "GET /provision-requests/{provisionRequestId}/results/latest", "value": "get:/provision-requests/{provisionRequestId}/results/latest" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8ProvisionResults = Pax8ProvisionResults;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8Provisioners implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Provisioners = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Provisioners {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Provisioners', name: 'pax8Provisioners', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Provisioners', defaults: { name: 'Pax8 Provisioners' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /provisioners/{provisionerId}/webhooks", "value": "get:/provisioners/{provisionerId}/webhooks" }, { "name": "POST /provisioners/{provisionerId}/webhooks", "value": "post:/provisioners/{provisionerId}/webhooks" }, { "name": "GET /provisioners", "value": "get:/provisioners" }, { "name": "GET /provisioners/{provisionerId}", "value": "get:/provisioners/{provisionerId}" }, { "name": "GET /provisioners/{provisionerId}/webhooks/{webhookId}", "value": "get:/provisioners/{provisionerId}/webhooks/{webhookId}" }, { "name": "GET /provisioners/{provisionerId}/webhooks/latest", "value": "get:/provisioners/{provisionerId}/webhooks/latest" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Provisioners = Pax8Provisioners;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8ProvisioningSimulations implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8ProvisioningSimulations = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8ProvisioningSimulations {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Provisioning Simulations', name: 'pax8ProvisioningSimulations', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Provisioning Simulations', defaults: { name: 'Pax8 Provisioning Simulations' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "POST /provision-simulations/order-events", "value": "post:/provision-simulations/order-events" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8ProvisioningSimulations = Pax8ProvisioningSimulations;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8Quoteaccesslist implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Quoteaccesslist = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Quoteaccesslist {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Quote access list', name: 'pax8Quoteaccesslist', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Quote access list', defaults: { name: 'Pax8 Quote access list' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /v2/quotes/{quoteId}/access-list", "value": "get:/v2/quotes/{quoteId}/access-list" }, { "name": "POST /v2/quotes/{quoteId}/access-list", "value": "post:/v2/quotes/{quoteId}/access-list" }, { "name": "DELETE /v2/quotes/{quoteId}/access-list/{accessListEntryId}", "value": "delete:/v2/quotes/{quoteId}/access-list/{accessListEntryId}" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Quoteaccesslist = Pax8Quoteaccesslist;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8Quoteattachments implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Quoteattachments = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Quoteattachments {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Quote attachments', name: 'pax8Quoteattachments', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Quote attachments', defaults: { name: 'Pax8 Quote attachments' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /v2/quotes/{quoteId}/attachments", "value": "get:/v2/quotes/{quoteId}/attachments" }, { "name": "POST /v2/quotes/{quoteId}/attachments", "value": "post:/v2/quotes/{quoteId}/attachments" }, { "name": "PUT /v2/quotes/{quoteId}/attachments", "value": "put:/v2/quotes/{quoteId}/attachments" }, { "name": "POST /v2/quotes/{quoteId}/attachments/shared", "value": "post:/v2/quotes/{quoteId}/attachments/shared" }, { "name": "DELETE /v2/quotes/{quoteId}/attachments/{attachmentId}", "value": "delete:/v2/quotes/{quoteId}/attachments/{attachmentId}" }, { "name": "GET /v2/quotes/{quoteId}/attachments/{attachmentId}", "value": "get:/v2/quotes/{quoteId}/attachments/{attachmentId}" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Quoteattachments = Pax8Quoteattachments;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8Quotelineitems implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Quotelineitems = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Quotelineitems {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Quote line items', name: 'pax8Quotelineitems', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Quote line items', defaults: { name: 'Pax8 Quote line items' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "POST /v2/quotes/{quoteId}/line-items", "value": "post:/v2/quotes/{quoteId}/line-items" }, { "name": "PUT /v2/quotes/{quoteId}/line-items", "value": "put:/v2/quotes/{quoteId}/line-items" }, { "name": "POST /v2/quotes/{quoteId}/line-items/bulk-delete", "value": "post:/v2/quotes/{quoteId}/line-items/bulk-delete" }, { "name": "DELETE /v2/quotes/{quoteId}/line-items/{lineItemId}", "value": "delete:/v2/quotes/{quoteId}/line-items/{lineItemId}" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Quotelineitems = Pax8Quotelineitems;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8Quotepreferences implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Quotepreferences = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Quotepreferences {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Quote preferences', name: 'pax8Quotepreferences', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Quote preferences', defaults: { name: 'Pax8 Quote preferences' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /v2/quote-preferences", "value": "get:/v2/quote-preferences" }, { "name": "PUT /v2/quote-preferences", "value": "put:/v2/quote-preferences" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Quotepreferences = Pax8Quotepreferences;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8Quotes implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Quotes = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Quotes {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Quotes', name: 'pax8Quotes', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Quotes', defaults: { name: 'Pax8 Quotes' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /v2/quotes", "value": "get:/v2/quotes" }, { "name": "POST /v2/quotes", "value": "post:/v2/quotes" }, { "name": "DELETE /v2/quotes/{quoteId}", "value": "delete:/v2/quotes/{quoteId}" }, { "name": "GET /v2/quotes/{quoteId}", "value": "get:/v2/quotes/{quoteId}" }, { "name": "PUT /v2/quotes/{quoteId}", "value": "put:/v2/quotes/{quoteId}" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Quotes = Pax8Quotes;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8Quotesections implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Quotesections = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Quotesections {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Quote sections', name: 'pax8Quotesections', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Quote sections', defaults: { name: 'Pax8 Quote sections' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /v2/quotes/{quoteId}/sections", "value": "get:/v2/quotes/{quoteId}/sections" }, { "name": "POST /v2/quotes/{quoteId}/sections", "value": "post:/v2/quotes/{quoteId}/sections" }, { "name": "PUT /v2/quotes/{quoteId}/sections", "value": "put:/v2/quotes/{quoteId}/sections" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Quotesections = Pax8Quotesections;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8Subscriptions implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Pax8Subscriptions = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const qs_1 = __importDefault(require("qs"));
|
|
9
|
-
class Pax8Subscriptions {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.description = {
|
|
12
|
-
displayName: 'Pax8 Subscriptions', name: 'pax8Subscriptions', group: ['transform'], version: 1,
|
|
13
|
-
description: 'Pax8 Subscriptions', defaults: { name: 'Pax8 Subscriptions' }, inputs: ['main'], outputs: ['main'],
|
|
14
|
-
credentials: [{ name: 'pax8OAuth2Api', required: true }],
|
|
15
|
-
properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /subscriptions", "value": "get:/subscriptions" }, { "name": "GET /subscriptions/{subscriptionId}", "value": "get:/subscriptions/{subscriptionId}" }, { "name": "PUT /subscriptions/{subscriptionId}", "value": "put:/subscriptions/{subscriptionId}" }, { "name": "DELETE /subscriptions/{subscriptionId}", "value": "delete:/subscriptions/{subscriptionId}" }, { "name": "GET /subscriptions/{subscriptionId}/history", "value": "get:/subscriptions/{subscriptionId}/history" }], default: '' }]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async getAccessToken(creds) {
|
|
19
|
-
const data = qs_1.default.stringify({ grant_type: 'client_credentials', client_id: creds.clientId, client_secret: creds.clientSecret, scope: creds.scope });
|
|
20
|
-
const res = await axios_1.default.post('https://api.pax8.com/auth/connect/token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
21
|
-
return res.data.access_token;
|
|
22
|
-
}
|
|
23
|
-
async execute() {
|
|
24
|
-
const op = this.getNodeParameter('operation', 0);
|
|
25
|
-
const [method, path] = op.split(':');
|
|
26
|
-
const creds = await this.getCredentials('pax8OAuth2Api');
|
|
27
|
-
const token = await this.getAccessToken(creds);
|
|
28
|
-
const url = 'https://api.pax8.com' + path;
|
|
29
|
-
const res = await (0, axios_1.default)({ method, url, headers: { Authorization: `Bearer ${token}` } });
|
|
30
|
-
return [this.helpers.returnJsonArray(res.data)];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Pax8Subscriptions = Pax8Subscriptions;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
|
-
export declare class Pax8TopicDefinitions implements INodeType {
|
|
4
|
-
description: INodeTypeDescription;
|
|
5
|
-
getAccessToken(creds: any): Promise<any>;
|
|
6
|
-
execute(this: IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
7
|
-
}
|