@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.
Files changed (88) hide show
  1. package/README.md +30 -31
  2. package/package.json +2 -38
  3. package/src/credentials/Pax8OAuth2Api.credentials.ts +1 -11
  4. package/src/index.ts +1 -26
  5. package/src/nodes/Pax8Sample.node.ts +1 -0
  6. package/tsconfig.json +1 -1
  7. package/dist/credentials/Pax8OAuth2Api.credentials.d.ts +0 -6
  8. package/dist/credentials/Pax8OAuth2Api.credentials.js +0 -15
  9. package/dist/index.d.ts +0 -27
  10. package/dist/index.js +0 -66
  11. package/dist/nodes/Pax8AccessToken.node.d.ts +0 -7
  12. package/dist/nodes/Pax8AccessToken.node.js +0 -33
  13. package/dist/nodes/Pax8Companies.node.d.ts +0 -7
  14. package/dist/nodes/Pax8Companies.node.js +0 -33
  15. package/dist/nodes/Pax8Contacts.node.d.ts +0 -7
  16. package/dist/nodes/Pax8Contacts.node.js +0 -33
  17. package/dist/nodes/Pax8Invoices.node.d.ts +0 -7
  18. package/dist/nodes/Pax8Invoices.node.js +0 -33
  19. package/dist/nodes/Pax8Libraryattachments.node.d.ts +0 -7
  20. package/dist/nodes/Pax8Libraryattachments.node.js +0 -33
  21. package/dist/nodes/Pax8Orders.node.d.ts +0 -7
  22. package/dist/nodes/Pax8Orders.node.js +0 -33
  23. package/dist/nodes/Pax8Preferenceattachments.node.d.ts +0 -7
  24. package/dist/nodes/Pax8Preferenceattachments.node.js +0 -33
  25. package/dist/nodes/Pax8Products.node.d.ts +0 -7
  26. package/dist/nodes/Pax8Products.node.js +0 -33
  27. package/dist/nodes/Pax8ProvisionAttempts.node.d.ts +0 -7
  28. package/dist/nodes/Pax8ProvisionAttempts.node.js +0 -33
  29. package/dist/nodes/Pax8ProvisionDetails.node.d.ts +0 -7
  30. package/dist/nodes/Pax8ProvisionDetails.node.js +0 -33
  31. package/dist/nodes/Pax8ProvisionRequests.node.d.ts +0 -7
  32. package/dist/nodes/Pax8ProvisionRequests.node.js +0 -33
  33. package/dist/nodes/Pax8ProvisionResults.node.d.ts +0 -7
  34. package/dist/nodes/Pax8ProvisionResults.node.js +0 -33
  35. package/dist/nodes/Pax8Provisioners.node.d.ts +0 -7
  36. package/dist/nodes/Pax8Provisioners.node.js +0 -33
  37. package/dist/nodes/Pax8ProvisioningSimulations.node.d.ts +0 -7
  38. package/dist/nodes/Pax8ProvisioningSimulations.node.js +0 -33
  39. package/dist/nodes/Pax8Quoteaccesslist.node.d.ts +0 -7
  40. package/dist/nodes/Pax8Quoteaccesslist.node.js +0 -33
  41. package/dist/nodes/Pax8Quoteattachments.node.d.ts +0 -7
  42. package/dist/nodes/Pax8Quoteattachments.node.js +0 -33
  43. package/dist/nodes/Pax8Quotelineitems.node.d.ts +0 -7
  44. package/dist/nodes/Pax8Quotelineitems.node.js +0 -33
  45. package/dist/nodes/Pax8Quotepreferences.node.d.ts +0 -7
  46. package/dist/nodes/Pax8Quotepreferences.node.js +0 -33
  47. package/dist/nodes/Pax8Quotes.node.d.ts +0 -7
  48. package/dist/nodes/Pax8Quotes.node.js +0 -33
  49. package/dist/nodes/Pax8Quotesections.node.d.ts +0 -7
  50. package/dist/nodes/Pax8Quotesections.node.js +0 -33
  51. package/dist/nodes/Pax8Subscriptions.node.d.ts +0 -7
  52. package/dist/nodes/Pax8Subscriptions.node.js +0 -33
  53. package/dist/nodes/Pax8TopicDefinitions.node.d.ts +0 -7
  54. package/dist/nodes/Pax8TopicDefinitions.node.js +0 -33
  55. package/dist/nodes/Pax8UsageLines.node.d.ts +0 -7
  56. package/dist/nodes/Pax8UsageLines.node.js +0 -33
  57. package/dist/nodes/Pax8UsageSummaries.node.d.ts +0 -7
  58. package/dist/nodes/Pax8UsageSummaries.node.js +0 -33
  59. package/dist/nodes/Pax8WebhookLogs.node.d.ts +0 -7
  60. package/dist/nodes/Pax8WebhookLogs.node.js +0 -33
  61. package/dist/nodes/Pax8Webhooks.node.d.ts +0 -7
  62. package/dist/nodes/Pax8Webhooks.node.js +0 -33
  63. package/src/nodes/Pax8AccessToken.node.ts +0 -27
  64. package/src/nodes/Pax8Companies.node.ts +0 -27
  65. package/src/nodes/Pax8Contacts.node.ts +0 -27
  66. package/src/nodes/Pax8Invoices.node.ts +0 -27
  67. package/src/nodes/Pax8Libraryattachments.node.ts +0 -27
  68. package/src/nodes/Pax8Orders.node.ts +0 -27
  69. package/src/nodes/Pax8Preferenceattachments.node.ts +0 -27
  70. package/src/nodes/Pax8Products.node.ts +0 -27
  71. package/src/nodes/Pax8ProvisionAttempts.node.ts +0 -27
  72. package/src/nodes/Pax8ProvisionDetails.node.ts +0 -27
  73. package/src/nodes/Pax8ProvisionRequests.node.ts +0 -27
  74. package/src/nodes/Pax8ProvisionResults.node.ts +0 -27
  75. package/src/nodes/Pax8Provisioners.node.ts +0 -27
  76. package/src/nodes/Pax8ProvisioningSimulations.node.ts +0 -27
  77. package/src/nodes/Pax8Quoteaccesslist.node.ts +0 -27
  78. package/src/nodes/Pax8Quoteattachments.node.ts +0 -27
  79. package/src/nodes/Pax8Quotelineitems.node.ts +0 -27
  80. package/src/nodes/Pax8Quotepreferences.node.ts +0 -27
  81. package/src/nodes/Pax8Quotes.node.ts +0 -27
  82. package/src/nodes/Pax8Quotesections.node.ts +0 -27
  83. package/src/nodes/Pax8Subscriptions.node.ts +0 -27
  84. package/src/nodes/Pax8TopicDefinitions.node.ts +0 -27
  85. package/src/nodes/Pax8UsageLines.node.ts +0 -27
  86. package/src/nodes/Pax8UsageSummaries.node.ts +0 -27
  87. package/src/nodes/Pax8WebhookLogs.node.ts +0 -27
  88. 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.Pax8TopicDefinitions = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const qs_1 = __importDefault(require("qs"));
9
- class Pax8TopicDefinitions {
10
- constructor() {
11
- this.description = {
12
- displayName: 'Pax8 Topic Definitions', name: 'pax8TopicDefinitions', group: ['transform'], version: 1,
13
- description: 'Pax8 Topic Definitions', defaults: { name: 'Pax8 Topic Definitions' }, inputs: ['main'], outputs: ['main'],
14
- credentials: [{ name: 'pax8OAuth2Api', required: true }],
15
- properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /webhooks/topic-definitions", "value": "get:/webhooks/topic-definitions" }], 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.Pax8TopicDefinitions = Pax8TopicDefinitions;
@@ -1,7 +0,0 @@
1
- import { IExecuteFunctions } from 'n8n-workflow';
2
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
3
- export declare class Pax8UsageLines 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.Pax8UsageLines = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const qs_1 = __importDefault(require("qs"));
9
- class Pax8UsageLines {
10
- constructor() {
11
- this.description = {
12
- displayName: 'Pax8 Usage Lines', name: 'pax8UsageLines', group: ['transform'], version: 1,
13
- description: 'Pax8 Usage Lines', defaults: { name: 'Pax8 Usage Lines' }, inputs: ['main'], outputs: ['main'],
14
- credentials: [{ name: 'pax8OAuth2Api', required: true }],
15
- properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /lines", "value": "get:/lines" }, { "name": "POST /lines", "value": "post:/lines" }, { "name": "POST /aggregate-lines", "value": "post:/aggregate-lines" }], 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.Pax8UsageLines = Pax8UsageLines;
@@ -1,7 +0,0 @@
1
- import { IExecuteFunctions } from 'n8n-workflow';
2
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
3
- export declare class Pax8UsageSummaries 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.Pax8UsageSummaries = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const qs_1 = __importDefault(require("qs"));
9
- class Pax8UsageSummaries {
10
- constructor() {
11
- this.description = {
12
- displayName: 'Pax8 Usage Summaries', name: 'pax8UsageSummaries', group: ['transform'], version: 1,
13
- description: 'Pax8 Usage Summaries', defaults: { name: 'Pax8 Usage Summaries' }, inputs: ['main'], outputs: ['main'],
14
- credentials: [{ name: 'pax8OAuth2Api', required: true }],
15
- properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /subscriptions/{subscriptionId}/usage-summaries", "value": "get:/subscriptions/{subscriptionId}/usage-summaries" }, { "name": "GET /usage-summaries/{usageSummaryId}", "value": "get:/usage-summaries/{usageSummaryId}" }, { "name": "GET /usage-summaries/{usageSummaryId}/usage-lines", "value": "get:/usage-summaries/{usageSummaryId}/usage-lines" }], 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.Pax8UsageSummaries = Pax8UsageSummaries;
@@ -1,7 +0,0 @@
1
- import { IExecuteFunctions } from 'n8n-workflow';
2
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
3
- export declare class Pax8WebhookLogs 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.Pax8WebhookLogs = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const qs_1 = __importDefault(require("qs"));
9
- class Pax8WebhookLogs {
10
- constructor() {
11
- this.description = {
12
- displayName: 'Pax8 Webhook Logs', name: 'pax8WebhookLogs', group: ['transform'], version: 1,
13
- description: 'Pax8 Webhook Logs', defaults: { name: 'Pax8 Webhook Logs' }, inputs: ['main'], outputs: ['main'],
14
- credentials: [{ name: 'pax8OAuth2Api', required: true }],
15
- properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /webhooks/{webhookId}/logs", "value": "get:/webhooks/{webhookId}/logs" }, { "name": "GET /webhooks/{webhookId}/logs/{id}", "value": "get:/webhooks/{webhookId}/logs/{id}" }, { "name": "POST /webhooks/{webhookId}/logs/{logId}/retry", "value": "post:/webhooks/{webhookId}/logs/{logId}/retry" }], 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.Pax8WebhookLogs = Pax8WebhookLogs;
@@ -1,7 +0,0 @@
1
- import { IExecuteFunctions } from 'n8n-workflow';
2
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
3
- export declare class Pax8Webhooks 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.Pax8Webhooks = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const qs_1 = __importDefault(require("qs"));
9
- class Pax8Webhooks {
10
- constructor() {
11
- this.description = {
12
- displayName: 'Pax8 Webhooks', name: 'pax8Webhooks', group: ['transform'], version: 1,
13
- description: 'Pax8 Webhooks', defaults: { name: 'Pax8 Webhooks' }, inputs: ['main'], outputs: ['main'],
14
- credentials: [{ name: 'pax8OAuth2Api', required: true }],
15
- properties: [{ displayName: 'Operation', name: 'operation', type: 'options', options: [{ "name": "GET /webhooks", "value": "get:/webhooks" }, { "name": "POST /webhooks", "value": "post:/webhooks" }, { "name": "GET /webhooks/{id}", "value": "get:/webhooks/{id}" }, { "name": "DELETE /webhooks/{id}", "value": "delete:/webhooks/{id}" }, { "name": "POST /webhooks/{id}/configuration", "value": "post:/webhooks/{id}/configuration" }, { "name": "POST /webhooks/{id}/status", "value": "post:/webhooks/{id}/status" }, { "name": "POST /webhooks/{id}/topics", "value": "post:/webhooks/{id}/topics" }, { "name": "PUT /webhooks/{id}/topics", "value": "put:/webhooks/{id}/topics" }, { "name": "DELETE /webhooks/{id}/topics/{topicId}", "value": "delete:/webhooks/{id}/topics/{topicId}" }, { "name": "POST /webhooks/{id}/topics/{topicId}/configuration", "value": "post:/webhooks/{id}/topics/{topicId}/configuration" }, { "name": "POST /webhooks/{id}/topics/{topic}/test", "value": "post:/webhooks/{id}/topics/{topic}/test" }], 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.Pax8Webhooks = Pax8Webhooks;
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8AccessToken implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Access Token', name:'pax8AccessToken', group:['transform'], version:1,
9
- description:'Pax8 Access Token', defaults:{name:'Pax8 Access Token'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- properties:[{displayName:'Operation', name:'operation', type:'options', options:[{"name": "POST /token", "value": "post:/token"}], default:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8Companies implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Companies', name:'pax8Companies', group:['transform'], version:1,
9
- description:'Pax8 Companies', defaults:{name:'Pax8 Companies'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- properties:[{displayName:'Operation', name:'operation', type:'options', options:[{"name": "POST /companies", "value": "post:/companies"}, {"name": "GET /companies", "value": "get:/companies"}, {"name": "GET /companies/{companyId}", "value": "get:/companies/{companyId}"}, {"name": "PATCH /companies/{companyId}", "value": "patch:/companies/{companyId}"}], default:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8Contacts implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Contacts', name:'pax8Contacts', group:['transform'], version:1,
9
- description:'Pax8 Contacts', defaults:{name:'Pax8 Contacts'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- properties:[{displayName:'Operation', name:'operation', type:'options', options:[{"name": "POST /companies/{companyId}/contacts", "value": "post:/companies/{companyId}/contacts"}, {"name": "GET /companies/{companyId}/contacts", "value": "get:/companies/{companyId}/contacts"}, {"name": "GET /companies/{companyId}/contacts/{contactId}", "value": "get:/companies/{companyId}/contacts/{contactId}"}, {"name": "PUT /companies/{companyId}/contacts/{contactId}", "value": "put:/companies/{companyId}/contacts/{contactId}"}, {"name": "DELETE /companies/{companyId}/contacts/{contactId}", "value": "delete:/companies/{companyId}/contacts/{contactId}"}], default:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8Invoices implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Invoices', name:'pax8Invoices', group:['transform'], version:1,
9
- description:'Pax8 Invoices', defaults:{name:'Pax8 Invoices'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- properties:[{displayName:'Operation', name:'operation', type:'options', options:[{"name": "GET /invoices", "value": "get:/invoices"}, {"name": "GET /invoices/{invoiceId}", "value": "get:/invoices/{invoiceId}"}, {"name": "GET /invoices/{invoiceId}/items", "value": "get:/invoices/{invoiceId}/items"}, {"name": "GET /invoices/draftItems", "value": "get:/invoices/draftItems"}], default:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8Libraryattachments implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Library attachments', name:'pax8Libraryattachments', group:['transform'], version:1,
9
- description:'Pax8 Library attachments', defaults:{name:'Pax8 Library attachments'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- properties:[{displayName:'Operation', name:'operation', type:'options', options:[{"name": "GET /v2/quote-attachments", "value": "get:/v2/quote-attachments"}, {"name": "POST /v2/quote-attachments", "value": "post:/v2/quote-attachments"}, {"name": "PUT /v2/quote-attachments", "value": "put:/v2/quote-attachments"}, {"name": "POST /v2/quote-attachments/shared", "value": "post:/v2/quote-attachments/shared"}, {"name": "DELETE /v2/quote-attachments/{attachmentId}", "value": "delete:/v2/quote-attachments/{attachmentId}"}, {"name": "GET /v2/quote-attachments/{attachmentId}", "value": "get:/v2/quote-attachments/{attachmentId}"}, {"name": "PATCH /v2/quote-attachments/{attachmentId}", "value": "patch:/v2/quote-attachments/{attachmentId}"}], default:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8Orders implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Orders', name:'pax8Orders', group:['transform'], version:1,
9
- description:'Pax8 Orders', defaults:{name:'Pax8 Orders'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- properties:[{displayName:'Operation', name:'operation', type:'options', options:[{"name": "GET /orders", "value": "get:/orders"}, {"name": "POST /orders", "value": "post:/orders"}, {"name": "GET /orders/{orderId}", "value": "get:/orders/{orderId}"}], default:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8Preferenceattachments implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Preference attachments', name:'pax8Preferenceattachments', group:['transform'], version:1,
9
- description:'Pax8 Preference attachments', defaults:{name:'Pax8 Preference attachments'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- properties:[{displayName:'Operation', name:'operation', type:'options', options:[{"name": "POST /v2/quote-preferences/attachments", "value": "post:/v2/quote-preferences/attachments"}, {"name": "DELETE /v2/quote-preferences/attachments/{attachmentId}", "value": "delete:/v2/quote-preferences/attachments/{attachmentId}"}], default:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8Products implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Products', name:'pax8Products', group:['transform'], version:1,
9
- description:'Pax8 Products', defaults:{name:'Pax8 Products'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- 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:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8ProvisionAttempts implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Provision Attempts', name:'pax8ProvisionAttempts', group:['transform'], version:1,
9
- description:'Pax8 Provision Attempts', defaults:{name:'Pax8 Provision Attempts'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- 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:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8ProvisionDetails implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Provision Details', name:'pax8ProvisionDetails', group:['transform'], version:1,
9
- description:'Pax8 Provision Details', defaults:{name:'Pax8 Provision Details'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- 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:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8ProvisionRequests implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Provision Requests', name:'pax8ProvisionRequests', group:['transform'], version:1,
9
- description:'Pax8 Provision Requests', defaults:{name:'Pax8 Provision Requests'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- 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:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8ProvisionResults implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Provision Results', name:'pax8ProvisionResults', group:['transform'], version:1,
9
- description:'Pax8 Provision Results', defaults:{name:'Pax8 Provision Results'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- 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:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8Provisioners implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Provisioners', name:'pax8Provisioners', group:['transform'], version:1,
9
- description:'Pax8 Provisioners', defaults:{name:'Pax8 Provisioners'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- 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:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }
@@ -1,27 +0,0 @@
1
-
2
- import axios from 'axios';
3
- import qs from 'qs';
4
- import { IExecuteFunctions } from 'n8n-workflow';
5
- import { INodeType, INodeTypeDescription } from 'n8n-workflow';
6
- export class Pax8ProvisioningSimulations implements INodeType {
7
- description: INodeTypeDescription = {
8
- displayName:'Pax8 Provisioning Simulations', name:'pax8ProvisioningSimulations', group:['transform'], version:1,
9
- description:'Pax8 Provisioning Simulations', defaults:{name:'Pax8 Provisioning Simulations'}, inputs:['main'], outputs:['main'],
10
- credentials:[{name:'pax8OAuth2Api', required:true}],
11
- properties:[{displayName:'Operation', name:'operation', type:'options', options:[{"name": "POST /provision-simulations/order-events", "value": "post:/provision-simulations/order-events"}], default:''}]
12
- };
13
- async getAccessToken(creds:any){
14
- const data = qs.stringify({grant_type:'client_credentials', client_id:creds.clientId, client_secret:creds.clientSecret, scope:creds.scope});
15
- const res = await axios.post('https://api.pax8.com/auth/connect/token', data, {headers:{'Content-Type':'application/x-www-form-urlencoded'}});
16
- return res.data.access_token;
17
- }
18
- async execute(this:IExecuteFunctions){
19
- const op=this.getNodeParameter('operation',0) as string;
20
- const [method,path]=op.split(':');
21
- const creds=await this.getCredentials('pax8OAuth2Api');
22
- const token=await this.getAccessToken(creds);
23
- const url='https://api.pax8.com'+path;
24
- const res=await axios({method,url,headers:{Authorization:`Bearer ${token }`}});
25
- return [this.helpers.returnJsonArray(res.data)];
26
- }
27
- }