@probo/n8n-nodes-probo 0.187.1 → 0.188.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/nodes/Probo/actions/document/publish.operation.js +1 -1
  2. package/dist/nodes/Probo/actions/document/publish.operation.js.map +1 -1
  3. package/dist/nodes/Probo/actions/measure/index.d.ts +3 -1
  4. package/dist/nodes/Probo/actions/measure/index.js +19 -1
  5. package/dist/nodes/Probo/actions/measure/index.js.map +1 -1
  6. package/dist/nodes/Probo/actions/measure/linkThirdParty.operation.d.ts +3 -0
  7. package/dist/nodes/Probo/actions/measure/linkThirdParty.operation.js +63 -0
  8. package/dist/nodes/Probo/actions/measure/linkThirdParty.operation.js.map +1 -0
  9. package/dist/nodes/Probo/actions/measure/unlinkThirdParty.operation.d.ts +3 -0
  10. package/dist/nodes/Probo/actions/measure/unlinkThirdParty.operation.js +53 -0
  11. package/dist/nodes/Probo/actions/measure/unlinkThirdParty.operation.js.map +1 -0
  12. package/dist/nodes/Probo/actions/thirdParty/create.operation.js +10 -0
  13. package/dist/nodes/Probo/actions/thirdParty/create.operation.js.map +1 -1
  14. package/dist/nodes/Probo/actions/thirdParty/getAll.operation.js +17 -3
  15. package/dist/nodes/Probo/actions/thirdParty/getAll.operation.js.map +1 -1
  16. package/dist/nodes/Probo/actions/thirdParty/index.d.ts +4 -1
  17. package/dist/nodes/Probo/actions/thirdParty/index.js +28 -1
  18. package/dist/nodes/Probo/actions/thirdParty/index.js.map +1 -1
  19. package/dist/nodes/Probo/actions/thirdParty/linkThirdParty.operation.d.ts +3 -0
  20. package/dist/nodes/Probo/actions/thirdParty/linkThirdParty.operation.js +57 -0
  21. package/dist/nodes/Probo/actions/thirdParty/linkThirdParty.operation.js.map +1 -0
  22. package/dist/nodes/Probo/actions/thirdParty/listChildThirdParties.operation.d.ts +3 -0
  23. package/dist/nodes/Probo/actions/thirdParty/listChildThirdParties.operation.js +93 -0
  24. package/dist/nodes/Probo/actions/thirdParty/listChildThirdParties.operation.js.map +1 -0
  25. package/dist/nodes/Probo/actions/thirdParty/unlinkThirdParty.operation.d.ts +3 -0
  26. package/dist/nodes/Probo/actions/thirdParty/unlinkThirdParty.operation.js +52 -0
  27. package/dist/nodes/Probo/actions/thirdParty/unlinkThirdParty.operation.js.map +1 -0
  28. package/dist/package.json +1 -1
  29. package/dist/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +1 -1
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const GenericFunctions_1 = require("../../GenericFunctions");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Third Party ID',
9
+ name: 'thirdPartyId',
10
+ type: 'string',
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['thirdParty'],
14
+ operation: ['listChildThirdParties'],
15
+ },
16
+ },
17
+ default: '',
18
+ description: 'The ID of the parent third party',
19
+ required: true,
20
+ },
21
+ {
22
+ displayName: 'Return All',
23
+ name: 'returnAll',
24
+ type: 'boolean',
25
+ displayOptions: {
26
+ show: {
27
+ resource: ['thirdParty'],
28
+ operation: ['listChildThirdParties'],
29
+ },
30
+ },
31
+ default: false,
32
+ description: 'Whether to return all results or only up to a given limit',
33
+ },
34
+ {
35
+ displayName: 'Limit',
36
+ name: 'limit',
37
+ type: 'number',
38
+ displayOptions: {
39
+ show: {
40
+ resource: ['thirdParty'],
41
+ operation: ['listChildThirdParties'],
42
+ returnAll: [false],
43
+ },
44
+ },
45
+ typeOptions: {
46
+ minValue: 1,
47
+ },
48
+ default: 50,
49
+ description: 'Max number of results to return',
50
+ },
51
+ ];
52
+ async function execute(itemIndex) {
53
+ const thirdPartyId = this.getNodeParameter('thirdPartyId', itemIndex);
54
+ const returnAll = this.getNodeParameter('returnAll', itemIndex);
55
+ const limit = this.getNodeParameter('limit', itemIndex, 50);
56
+ const query = `
57
+ query GetChildThirdParties($thirdPartyId: ID!, $first: Int, $after: CursorKey) {
58
+ node(id: $thirdPartyId) {
59
+ ... on ThirdParty {
60
+ childThirdParties(first: $first, after: $after) {
61
+ edges {
62
+ node {
63
+ id
64
+ name
65
+ description
66
+ category
67
+ websiteUrl
68
+ legalName
69
+ headquarterAddress
70
+ createdAt
71
+ updatedAt
72
+ }
73
+ }
74
+ pageInfo {
75
+ hasNextPage
76
+ endCursor
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ `;
83
+ const childThirdParties = await GenericFunctions_1.proboApiRequestAllItems.call(this, query, { thirdPartyId }, (response) => {
84
+ const data = response === null || response === void 0 ? void 0 : response.data;
85
+ const node = data === null || data === void 0 ? void 0 : data.node;
86
+ return node === null || node === void 0 ? void 0 : node.childThirdParties;
87
+ }, returnAll, limit);
88
+ return {
89
+ json: { childThirdParties },
90
+ pairedItem: { item: itemIndex },
91
+ };
92
+ }
93
+ //# sourceMappingURL=listChildThirdParties.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listChildThirdParties.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/thirdParty/listChildThirdParties.operation.ts"],"names":[],"mappings":";;;AAgEA,0BAqDC;AAtGD,6DAAiE;AAEpD,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,uBAAuB,CAAC;aACpC;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kCAAkC;QAC/C,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,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EAAE,iBAAiB,EAAE;QAC3B,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData>;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const GenericFunctions_1 = require("../../GenericFunctions");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Parent Third Party ID',
9
+ name: 'parentThirdPartyId',
10
+ type: 'string',
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['thirdParty'],
14
+ operation: ['unlinkThirdParty'],
15
+ },
16
+ },
17
+ default: '',
18
+ description: 'The ID of the parent third party',
19
+ required: true,
20
+ },
21
+ {
22
+ displayName: 'Child Third Party ID',
23
+ name: 'childThirdPartyId',
24
+ type: 'string',
25
+ displayOptions: {
26
+ show: {
27
+ resource: ['thirdParty'],
28
+ operation: ['unlinkThirdParty'],
29
+ },
30
+ },
31
+ default: '',
32
+ description: 'The ID of the child third party to unlink',
33
+ required: true,
34
+ },
35
+ ];
36
+ async function execute(itemIndex) {
37
+ const parentThirdPartyId = this.getNodeParameter('parentThirdPartyId', itemIndex);
38
+ const childThirdPartyId = this.getNodeParameter('childThirdPartyId', itemIndex);
39
+ const query = `
40
+ mutation DeleteThirdPartyThirdPartyMapping($input: DeleteThirdPartyThirdPartyMappingInput!) {
41
+ deleteThirdPartyThirdPartyMapping(input: $input) {
42
+ removedThirdPartyId
43
+ }
44
+ }
45
+ `;
46
+ const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input: { parentThirdPartyId, childThirdPartyId } });
47
+ return {
48
+ json: responseData,
49
+ pairedItem: { item: itemIndex },
50
+ };
51
+ }
52
+ //# sourceMappingURL=unlinkThirdParty.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlinkThirdParty.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/thirdParty/unlinkThirdParty.operation.ts"],"names":[],"mappings":";;;AAgDA,0BAqBC;AAtDD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAC/B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kCAAkC;QAC/C,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAC/B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,2CAA2C;QACxD,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,SAAS,CAAW,CAAC;IAC5F,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,SAAS,CAAW,CAAC;IAE1F,MAAM,KAAK,GAAG;;;;;;EAMb,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,kCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;IAEnH,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probo/n8n-nodes-probo",
3
- "version": "0.187.1",
3
+ "version": "0.188.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build": "n8n-node build",