@heines/n8n-nodes-pax8 1.0.2

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 (87) hide show
  1. package/README.md +1 -0
  2. package/dist/credentials/Pax8OAuth2Api.credentials.d.ts +6 -0
  3. package/dist/credentials/Pax8OAuth2Api.credentials.js +15 -0
  4. package/dist/index.d.ts +27 -0
  5. package/dist/index.js +66 -0
  6. package/dist/nodes/Pax8AccessToken.node.d.ts +7 -0
  7. package/dist/nodes/Pax8AccessToken.node.js +33 -0
  8. package/dist/nodes/Pax8Companies.node.d.ts +7 -0
  9. package/dist/nodes/Pax8Companies.node.js +33 -0
  10. package/dist/nodes/Pax8Contacts.node.d.ts +7 -0
  11. package/dist/nodes/Pax8Contacts.node.js +33 -0
  12. package/dist/nodes/Pax8Invoices.node.d.ts +7 -0
  13. package/dist/nodes/Pax8Invoices.node.js +33 -0
  14. package/dist/nodes/Pax8Libraryattachments.node.d.ts +7 -0
  15. package/dist/nodes/Pax8Libraryattachments.node.js +33 -0
  16. package/dist/nodes/Pax8Orders.node.d.ts +7 -0
  17. package/dist/nodes/Pax8Orders.node.js +33 -0
  18. package/dist/nodes/Pax8Preferenceattachments.node.d.ts +7 -0
  19. package/dist/nodes/Pax8Preferenceattachments.node.js +33 -0
  20. package/dist/nodes/Pax8Products.node.d.ts +7 -0
  21. package/dist/nodes/Pax8Products.node.js +33 -0
  22. package/dist/nodes/Pax8ProvisionAttempts.node.d.ts +7 -0
  23. package/dist/nodes/Pax8ProvisionAttempts.node.js +33 -0
  24. package/dist/nodes/Pax8ProvisionDetails.node.d.ts +7 -0
  25. package/dist/nodes/Pax8ProvisionDetails.node.js +33 -0
  26. package/dist/nodes/Pax8ProvisionRequests.node.d.ts +7 -0
  27. package/dist/nodes/Pax8ProvisionRequests.node.js +33 -0
  28. package/dist/nodes/Pax8ProvisionResults.node.d.ts +7 -0
  29. package/dist/nodes/Pax8ProvisionResults.node.js +33 -0
  30. package/dist/nodes/Pax8Provisioners.node.d.ts +7 -0
  31. package/dist/nodes/Pax8Provisioners.node.js +33 -0
  32. package/dist/nodes/Pax8ProvisioningSimulations.node.d.ts +7 -0
  33. package/dist/nodes/Pax8ProvisioningSimulations.node.js +33 -0
  34. package/dist/nodes/Pax8Quoteaccesslist.node.d.ts +7 -0
  35. package/dist/nodes/Pax8Quoteaccesslist.node.js +33 -0
  36. package/dist/nodes/Pax8Quoteattachments.node.d.ts +7 -0
  37. package/dist/nodes/Pax8Quoteattachments.node.js +33 -0
  38. package/dist/nodes/Pax8Quotelineitems.node.d.ts +7 -0
  39. package/dist/nodes/Pax8Quotelineitems.node.js +33 -0
  40. package/dist/nodes/Pax8Quotepreferences.node.d.ts +7 -0
  41. package/dist/nodes/Pax8Quotepreferences.node.js +33 -0
  42. package/dist/nodes/Pax8Quotes.node.d.ts +7 -0
  43. package/dist/nodes/Pax8Quotes.node.js +33 -0
  44. package/dist/nodes/Pax8Quotesections.node.d.ts +7 -0
  45. package/dist/nodes/Pax8Quotesections.node.js +33 -0
  46. package/dist/nodes/Pax8Subscriptions.node.d.ts +7 -0
  47. package/dist/nodes/Pax8Subscriptions.node.js +33 -0
  48. package/dist/nodes/Pax8TopicDefinitions.node.d.ts +7 -0
  49. package/dist/nodes/Pax8TopicDefinitions.node.js +33 -0
  50. package/dist/nodes/Pax8UsageLines.node.d.ts +7 -0
  51. package/dist/nodes/Pax8UsageLines.node.js +33 -0
  52. package/dist/nodes/Pax8UsageSummaries.node.d.ts +7 -0
  53. package/dist/nodes/Pax8UsageSummaries.node.js +33 -0
  54. package/dist/nodes/Pax8WebhookLogs.node.d.ts +7 -0
  55. package/dist/nodes/Pax8WebhookLogs.node.js +33 -0
  56. package/dist/nodes/Pax8Webhooks.node.d.ts +7 -0
  57. package/dist/nodes/Pax8Webhooks.node.js +33 -0
  58. package/package.json +55 -0
  59. package/src/credentials/Pax8OAuth2Api.credentials.ts +11 -0
  60. package/src/index.ts +27 -0
  61. package/src/nodes/Pax8AccessToken.node.ts +27 -0
  62. package/src/nodes/Pax8Companies.node.ts +27 -0
  63. package/src/nodes/Pax8Contacts.node.ts +27 -0
  64. package/src/nodes/Pax8Invoices.node.ts +27 -0
  65. package/src/nodes/Pax8Libraryattachments.node.ts +27 -0
  66. package/src/nodes/Pax8Orders.node.ts +27 -0
  67. package/src/nodes/Pax8Preferenceattachments.node.ts +27 -0
  68. package/src/nodes/Pax8Products.node.ts +27 -0
  69. package/src/nodes/Pax8ProvisionAttempts.node.ts +27 -0
  70. package/src/nodes/Pax8ProvisionDetails.node.ts +27 -0
  71. package/src/nodes/Pax8ProvisionRequests.node.ts +27 -0
  72. package/src/nodes/Pax8ProvisionResults.node.ts +27 -0
  73. package/src/nodes/Pax8Provisioners.node.ts +27 -0
  74. package/src/nodes/Pax8ProvisioningSimulations.node.ts +27 -0
  75. package/src/nodes/Pax8Quoteaccesslist.node.ts +27 -0
  76. package/src/nodes/Pax8Quoteattachments.node.ts +27 -0
  77. package/src/nodes/Pax8Quotelineitems.node.ts +27 -0
  78. package/src/nodes/Pax8Quotepreferences.node.ts +27 -0
  79. package/src/nodes/Pax8Quotes.node.ts +27 -0
  80. package/src/nodes/Pax8Quotesections.node.ts +27 -0
  81. package/src/nodes/Pax8Subscriptions.node.ts +27 -0
  82. package/src/nodes/Pax8TopicDefinitions.node.ts +27 -0
  83. package/src/nodes/Pax8UsageLines.node.ts +27 -0
  84. package/src/nodes/Pax8UsageSummaries.node.ts +27 -0
  85. package/src/nodes/Pax8WebhookLogs.node.ts +27 -0
  86. package/src/nodes/Pax8Webhooks.node.ts +27 -0
  87. package/tsconfig.json +13 -0
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,33 @@
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;
@@ -0,0 +1,7 @@
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
+ }