@probo/n8n-nodes-probo 0.0.1

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 (114) hide show
  1. package/dist/credentials/ProboApi.credentials.d.ts +10 -0
  2. package/dist/credentials/ProboApi.credentials.js +50 -0
  3. package/dist/credentials/ProboApi.credentials.js.map +1 -0
  4. package/dist/icons/probo-light.svg +24 -0
  5. package/dist/icons/probo.svg +23 -0
  6. package/dist/nodes/Probo/GenericFunctions.d.ts +3 -0
  7. package/dist/nodes/Probo/GenericFunctions.js +69 -0
  8. package/dist/nodes/Probo/GenericFunctions.js.map +1 -0
  9. package/dist/nodes/Probo/Probo.node.d.ts +8 -0
  10. package/dist/nodes/Probo/Probo.node.js +113 -0
  11. package/dist/nodes/Probo/Probo.node.js.map +1 -0
  12. package/dist/nodes/Probo/Probo.node.json +19 -0
  13. package/dist/nodes/Probo/actions/asset/create.operation.d.ts +3 -0
  14. package/dist/nodes/Probo/actions/asset/create.operation.js +207 -0
  15. package/dist/nodes/Probo/actions/asset/create.operation.js.map +1 -0
  16. package/dist/nodes/Probo/actions/asset/delete.operation.d.ts +3 -0
  17. package/dist/nodes/Probo/actions/asset/delete.operation.js +37 -0
  18. package/dist/nodes/Probo/actions/asset/delete.operation.js.map +1 -0
  19. package/dist/nodes/Probo/actions/asset/get.operation.d.ts +3 -0
  20. package/dist/nodes/Probo/actions/asset/get.operation.js +97 -0
  21. package/dist/nodes/Probo/actions/asset/get.operation.js.map +1 -0
  22. package/dist/nodes/Probo/actions/asset/getAll.operation.d.ts +3 -0
  23. package/dist/nodes/Probo/actions/asset/getAll.operation.js +140 -0
  24. package/dist/nodes/Probo/actions/asset/getAll.operation.js.map +1 -0
  25. package/dist/nodes/Probo/actions/asset/index.d.ts +8 -0
  26. package/dist/nodes/Probo/actions/asset/index.js +98 -0
  27. package/dist/nodes/Probo/actions/asset/index.js.map +1 -0
  28. package/dist/nodes/Probo/actions/asset/update.operation.d.ts +3 -0
  29. package/dist/nodes/Probo/actions/asset/update.operation.js +204 -0
  30. package/dist/nodes/Probo/actions/asset/update.operation.js.map +1 -0
  31. package/dist/nodes/Probo/actions/control/create.operation.d.ts +3 -0
  32. package/dist/nodes/Probo/actions/control/create.operation.js +141 -0
  33. package/dist/nodes/Probo/actions/control/create.operation.js.map +1 -0
  34. package/dist/nodes/Probo/actions/control/delete.operation.d.ts +3 -0
  35. package/dist/nodes/Probo/actions/control/delete.operation.js +37 -0
  36. package/dist/nodes/Probo/actions/control/delete.operation.js.map +1 -0
  37. package/dist/nodes/Probo/actions/control/get.operation.d.ts +3 -0
  38. package/dist/nodes/Probo/actions/control/get.operation.js +49 -0
  39. package/dist/nodes/Probo/actions/control/get.operation.js.map +1 -0
  40. package/dist/nodes/Probo/actions/control/getAll.operation.d.ts +3 -0
  41. package/dist/nodes/Probo/actions/control/getAll.operation.js +92 -0
  42. package/dist/nodes/Probo/actions/control/getAll.operation.js.map +1 -0
  43. package/dist/nodes/Probo/actions/control/index.d.ts +8 -0
  44. package/dist/nodes/Probo/actions/control/index.js +98 -0
  45. package/dist/nodes/Probo/actions/control/index.js.map +1 -0
  46. package/dist/nodes/Probo/actions/control/update.operation.d.ts +3 -0
  47. package/dist/nodes/Probo/actions/control/update.operation.js +137 -0
  48. package/dist/nodes/Probo/actions/control/update.operation.js.map +1 -0
  49. package/dist/nodes/Probo/actions/datum/create.operation.d.ts +3 -0
  50. package/dist/nodes/Probo/actions/datum/create.operation.js +181 -0
  51. package/dist/nodes/Probo/actions/datum/create.operation.js.map +1 -0
  52. package/dist/nodes/Probo/actions/datum/delete.operation.d.ts +3 -0
  53. package/dist/nodes/Probo/actions/datum/delete.operation.js +37 -0
  54. package/dist/nodes/Probo/actions/datum/delete.operation.js.map +1 -0
  55. package/dist/nodes/Probo/actions/datum/get.operation.d.ts +3 -0
  56. package/dist/nodes/Probo/actions/datum/get.operation.js +95 -0
  57. package/dist/nodes/Probo/actions/datum/get.operation.js.map +1 -0
  58. package/dist/nodes/Probo/actions/datum/getAll.operation.d.ts +3 -0
  59. package/dist/nodes/Probo/actions/datum/getAll.operation.js +138 -0
  60. package/dist/nodes/Probo/actions/datum/getAll.operation.js.map +1 -0
  61. package/dist/nodes/Probo/actions/datum/index.d.ts +8 -0
  62. package/dist/nodes/Probo/actions/datum/index.js +98 -0
  63. package/dist/nodes/Probo/actions/datum/index.js.map +1 -0
  64. package/dist/nodes/Probo/actions/datum/update.operation.d.ts +3 -0
  65. package/dist/nodes/Probo/actions/datum/update.operation.js +178 -0
  66. package/dist/nodes/Probo/actions/datum/update.operation.js.map +1 -0
  67. package/dist/nodes/Probo/actions/execute/execute.operation.d.ts +3 -0
  68. package/dist/nodes/Probo/actions/execute/execute.operation.js +63 -0
  69. package/dist/nodes/Probo/actions/execute/execute.operation.js.map +1 -0
  70. package/dist/nodes/Probo/actions/execute/index.d.ts +4 -0
  71. package/dist/nodes/Probo/actions/execute/index.js +62 -0
  72. package/dist/nodes/Probo/actions/execute/index.js.map +1 -0
  73. package/dist/nodes/Probo/actions/framework/create.operation.d.ts +3 -0
  74. package/dist/nodes/Probo/actions/framework/create.operation.js +81 -0
  75. package/dist/nodes/Probo/actions/framework/create.operation.js.map +1 -0
  76. package/dist/nodes/Probo/actions/framework/delete.operation.d.ts +3 -0
  77. package/dist/nodes/Probo/actions/framework/delete.operation.js +37 -0
  78. package/dist/nodes/Probo/actions/framework/delete.operation.js.map +1 -0
  79. package/dist/nodes/Probo/actions/framework/get.operation.d.ts +3 -0
  80. package/dist/nodes/Probo/actions/framework/get.operation.js +46 -0
  81. package/dist/nodes/Probo/actions/framework/get.operation.js.map +1 -0
  82. package/dist/nodes/Probo/actions/framework/getAll.operation.d.ts +3 -0
  83. package/dist/nodes/Probo/actions/framework/getAll.operation.js +89 -0
  84. package/dist/nodes/Probo/actions/framework/getAll.operation.js.map +1 -0
  85. package/dist/nodes/Probo/actions/framework/index.d.ts +8 -0
  86. package/dist/nodes/Probo/actions/framework/index.js +98 -0
  87. package/dist/nodes/Probo/actions/framework/index.js.map +1 -0
  88. package/dist/nodes/Probo/actions/framework/update.operation.d.ts +3 -0
  89. package/dist/nodes/Probo/actions/framework/update.operation.js +76 -0
  90. package/dist/nodes/Probo/actions/framework/update.operation.js.map +1 -0
  91. package/dist/nodes/Probo/actions/index.d.ts +13 -0
  92. package/dist/nodes/Probo/actions/index.js +83 -0
  93. package/dist/nodes/Probo/actions/index.js.map +1 -0
  94. package/dist/nodes/Probo/actions/measure/create.operation.d.ts +3 -0
  95. package/dist/nodes/Probo/actions/measure/create.operation.js +99 -0
  96. package/dist/nodes/Probo/actions/measure/create.operation.js.map +1 -0
  97. package/dist/nodes/Probo/actions/measure/delete.operation.d.ts +3 -0
  98. package/dist/nodes/Probo/actions/measure/delete.operation.js +37 -0
  99. package/dist/nodes/Probo/actions/measure/delete.operation.js.map +1 -0
  100. package/dist/nodes/Probo/actions/measure/get.operation.d.ts +3 -0
  101. package/dist/nodes/Probo/actions/measure/get.operation.js +48 -0
  102. package/dist/nodes/Probo/actions/measure/get.operation.js.map +1 -0
  103. package/dist/nodes/Probo/actions/measure/getAll.operation.d.ts +3 -0
  104. package/dist/nodes/Probo/actions/measure/getAll.operation.js +91 -0
  105. package/dist/nodes/Probo/actions/measure/getAll.operation.js.map +1 -0
  106. package/dist/nodes/Probo/actions/measure/index.d.ts +8 -0
  107. package/dist/nodes/Probo/actions/measure/index.js +98 -0
  108. package/dist/nodes/Probo/actions/measure/index.js.map +1 -0
  109. package/dist/nodes/Probo/actions/measure/update.operation.d.ts +3 -0
  110. package/dist/nodes/Probo/actions/measure/update.operation.js +128 -0
  111. package/dist/nodes/Probo/actions/measure/update.operation.js.map +1 -0
  112. package/dist/package.json +63 -0
  113. package/dist/tsconfig.tsbuildinfo +1 -0
  114. package/package.json +63 -0
@@ -0,0 +1,10 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, Icon, INodeProperties } from 'n8n-workflow';
2
+ export declare class ProboApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProboApi = void 0;
4
+ class ProboApi {
5
+ constructor() {
6
+ this.name = 'proboApi';
7
+ this.displayName = 'Probo API';
8
+ this.icon = { light: 'file:../icons/probo-light.svg', dark: 'file:../icons/probo.svg' };
9
+ this.documentationUrl = 'https://www.getprobo.com/docs';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Probo Server',
13
+ name: 'server',
14
+ type: 'string',
15
+ default: 'https://us.console.getprobo.com',
16
+ description: 'The server to connect to.',
17
+ },
18
+ {
19
+ displayName: 'API Key',
20
+ name: 'apiKey',
21
+ type: 'string',
22
+ typeOptions: { password: true },
23
+ default: '',
24
+ },
25
+ ];
26
+ this.authenticate = {
27
+ type: 'generic',
28
+ properties: {
29
+ headers: {
30
+ Authorization: '=Bearer {{$credentials?.apiKey}}',
31
+ },
32
+ },
33
+ };
34
+ this.test = {
35
+ request: {
36
+ baseURL: '={{$credentials?.server}}',
37
+ url: '/api/console/v1/query',
38
+ method: 'POST',
39
+ headers: {
40
+ 'Content-Type': 'application/json',
41
+ },
42
+ body: {
43
+ query: 'query { viewer { id } }',
44
+ },
45
+ },
46
+ };
47
+ }
48
+ }
49
+ exports.ProboApi = ProboApi;
50
+ //# sourceMappingURL=ProboApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProboApi.credentials.js","sourceRoot":"","sources":["../../credentials/ProboApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,QAAQ;IAArB;QACC,SAAI,GAAG,UAAU,CAAC;QAElB,gBAAW,GAAG,WAAW,CAAC;QAEvB,SAAI,GAAS,EAAE,KAAK,EAAE,+BAA+B,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;QAE5F,qBAAgB,GAAG,+BAA+B,CAAC;QAEhD,eAAU,GAAsB;YAC5B;gBACL,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iCAAiC;gBAC1C,WAAW,EAAE,2BAA2B;aACxC;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;aACX;SACE,CAAC;QAEF,iBAAY,GAAyB;YACvC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,kCAAkC;iBACjD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,uBAAuB;gBAC5B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACR,cAAc,EAAE,kBAAkB;iBAClC;gBACD,IAAI,EAAE;oBACL,KAAK,EAAE,yBAAyB;iBAChC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAhDD,4BAgDC"}
@@ -0,0 +1,24 @@
1
+ <svg viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1030_164)">
3
+ <rect width="300" height="300" rx="70" fill="#FFFFFF"/>
4
+ <g clip-path="url(#clip1_1030_164)">
5
+ <rect width="320" height="320" transform="translate(-9.69238 -10)" fill="#FFFFFF"/>
6
+ <path d="M238.194 83.0279C274.406 137.651 160.574 258.266 -29.4255 142.266" stroke="#101E1C" stroke-width="42.6667"/>
7
+ <path d="M238.194 83.0279C274.406 137.651 160.574 258.266 -29.4255 142.266" stroke="url(#paint0_linear_1030_164)" stroke-width="42.6667"/>
8
+ <path d="M220.112 94.3364C226.365 104.327 239.53 107.363 249.515 101.118C259.501 94.873 262.527 81.7113 256.274 71.7206L238.193 83.0285L220.112 94.3364ZM97.9074 324.933L118.61 319.8C87.9762 196.62 115.788 133.041 146.656 105.377C162.52 91.1595 180.159 85.27 194.453 84.9721C209.505 84.6583 217.534 90.218 220.112 94.3364L238.193 83.0285L256.274 71.7206C242.999 50.5115 217.649 41.8122 193.53 42.315C168.652 42.8335 141.327 52.8361 118.165 73.5935C70.9833 115.879 44.5053 198.58 77.2047 330.066L97.9074 324.933Z" fill="#101E1C"/>
9
+ </g>
10
+ </g>
11
+ <defs>
12
+ <linearGradient id="paint0_linear_1030_164" x1="216.193" y1="173.319" x2="-18.0923" y2="173.319" gradientUnits="userSpaceOnUse">
13
+ <stop stop-color="#FFFFFF" stop-opacity="0"/>
14
+ <stop offset="1" stop-color="#FFFFFF"/>
15
+ </linearGradient>
16
+ <clipPath id="clip0_1030_164">
17
+ <rect width="300" height="300" rx="70" fill="white"/>
18
+ </clipPath>
19
+ <clipPath id="clip1_1030_164">
20
+ <rect width="320" height="320" fill="white" transform="translate(-9.69238 -10)"/>
21
+ </clipPath>
22
+ </defs>
23
+ </svg>
24
+
@@ -0,0 +1,23 @@
1
+ <svg viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1030_164)">
3
+ <rect width="300" height="300" rx="70" fill="#101E1C"/>
4
+ <g clip-path="url(#clip1_1030_164)">
5
+ <rect width="320" height="320" transform="translate(-9.69238 -10)" fill="#101E1C"/>
6
+ <path d="M238.194 83.0279C274.406 137.651 160.574 258.266 -29.4255 142.266" stroke="#E6FF03" stroke-width="42.6667"/>
7
+ <path d="M238.194 83.0279C274.406 137.651 160.574 258.266 -29.4255 142.266" stroke="url(#paint0_linear_1030_164)" stroke-width="42.6667"/>
8
+ <path d="M220.112 94.3364C226.365 104.327 239.53 107.363 249.515 101.118C259.501 94.873 262.527 81.7113 256.274 71.7206L238.193 83.0285L220.112 94.3364ZM97.9074 324.933L118.61 319.8C87.9762 196.62 115.788 133.041 146.656 105.377C162.52 91.1595 180.159 85.27 194.453 84.9721C209.505 84.6583 217.534 90.218 220.112 94.3364L238.193 83.0285L256.274 71.7206C242.999 50.5115 217.649 41.8122 193.53 42.315C168.652 42.8335 141.327 52.8361 118.165 73.5935C70.9833 115.879 44.5053 198.58 77.2047 330.066L97.9074 324.933Z" fill="#E6FF03"/>
9
+ </g>
10
+ </g>
11
+ <defs>
12
+ <linearGradient id="paint0_linear_1030_164" x1="216.193" y1="173.319" x2="-18.0923" y2="173.319" gradientUnits="userSpaceOnUse">
13
+ <stop stop-color="#101E1C" stop-opacity="0"/>
14
+ <stop offset="1" stop-color="#101E1C"/>
15
+ </linearGradient>
16
+ <clipPath id="clip0_1030_164">
17
+ <rect width="300" height="300" rx="70" fill="white"/>
18
+ </clipPath>
19
+ <clipPath id="clip1_1030_164">
20
+ <rect width="320" height="320" fill="white" transform="translate(-9.69238 -10)"/>
21
+ </clipPath>
22
+ </defs>
23
+ </svg>
@@ -0,0 +1,3 @@
1
+ import type { IExecuteFunctions, IHookFunctions, IDataObject } from 'n8n-workflow';
2
+ export declare function proboApiRequest(this: IExecuteFunctions | IHookFunctions, query: string, variables?: IDataObject): Promise<IDataObject>;
3
+ export declare function proboApiRequestAllItems(this: IExecuteFunctions, query: string, variables: IDataObject, getConnection: (response: IDataObject) => IDataObject | undefined, returnAll?: boolean, limit?: number): Promise<IDataObject[]>;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.proboApiRequest = proboApiRequest;
4
+ exports.proboApiRequestAllItems = proboApiRequestAllItems;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ async function proboApiRequest(query, variables = {}) {
7
+ const credentials = await this.getCredentials('proboApi');
8
+ if (!(credentials === null || credentials === void 0 ? void 0 : credentials.apiKey)) {
9
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), { message: 'API Key is required' });
10
+ }
11
+ const options = {
12
+ method: 'POST',
13
+ baseURL: `${credentials.server}`,
14
+ url: '/api/console/v1/query',
15
+ headers: {
16
+ Authorization: `Bearer ${credentials.apiKey}`,
17
+ 'Content-Type': 'application/json',
18
+ },
19
+ body: {
20
+ query,
21
+ variables,
22
+ },
23
+ json: true,
24
+ };
25
+ try {
26
+ return await this.helpers.httpRequest(options);
27
+ }
28
+ catch (error) {
29
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
30
+ }
31
+ }
32
+ async function proboApiRequestAllItems(query, variables, getConnection, returnAll = true, limit = 0) {
33
+ const items = [];
34
+ let hasNextPage = true;
35
+ let cursor = null;
36
+ const pageSize = 100;
37
+ while (hasNextPage) {
38
+ const currentLimit = returnAll ? pageSize : Math.min(pageSize, limit - items.length);
39
+ if (currentLimit <= 0) {
40
+ break;
41
+ }
42
+ const requestVariables = {
43
+ ...variables,
44
+ first: currentLimit,
45
+ };
46
+ if (cursor) {
47
+ requestVariables.after = cursor;
48
+ }
49
+ const responseData = await proboApiRequest.call(this, query, requestVariables);
50
+ const connection = getConnection(responseData);
51
+ if (connection === null || connection === void 0 ? void 0 : connection.edges) {
52
+ const edges = connection.edges;
53
+ items.push(...edges.map((edge) => edge.node));
54
+ }
55
+ if (connection === null || connection === void 0 ? void 0 : connection.pageInfo) {
56
+ const pageInfo = connection.pageInfo;
57
+ hasNextPage = pageInfo.hasNextPage;
58
+ cursor = pageInfo.endCursor;
59
+ }
60
+ else {
61
+ hasNextPage = false;
62
+ }
63
+ if (!returnAll && items.length >= limit) {
64
+ hasNextPage = false;
65
+ }
66
+ }
67
+ return items;
68
+ }
69
+ //# sourceMappingURL=GenericFunctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/Probo/GenericFunctions.ts"],"names":[],"mappings":";;AASA,0CA+BC;AAED,0DAkDC;AArFD,+CAA4C;AAErC,KAAK,UAAU,eAAe,CAEpC,KAAa,EACb,YAAyB,EAA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AAC,MAAM,CAAC,CAAC;QAErF,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;YACvB,MAAM;QACP,CAAC;QAED,MAAM,gBAAgB,GAAgB;YACrC,GAAG,SAAS;YACZ,KAAK,EAAE,YAAY;SACnB,CAAC;QACF,IAAI,MAAM,EAAE,CAAC;YACZ,gBAAgB,CAAC,KAAK,GAAG,MAAM,CAAC;QACjC,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC;QAC/E,MAAM,UAAU,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;QAE/C,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,UAAU,CAAC,KAAqC,CAAC;YAC/D,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,CAAC;QAED,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,EAAE,CAAC;YAC1B,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAuB,CAAC;YACpD,WAAW,GAAG,QAAQ,CAAC,WAAsB,CAAC;YAC9C,MAAM,GAAG,QAAQ,CAAC,SAA0B,CAAC;QAC9C,CAAC;aAAM,CAAC;YACP,WAAW,GAAG,KAAK,CAAC;QACrB,CAAC;QAED,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;YACzC,WAAW,GAAG,KAAK,CAAC;QACrB,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type IExecuteFunctions, type INodeExecutionData, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Probo implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ methods: {
6
+ listSearch: {};
7
+ };
8
+ }
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Probo = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const actions_1 = require("./actions");
6
+ class Probo {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: 'Probo',
10
+ name: 'probo',
11
+ icon: { light: 'file:../../icons/probo-light.svg', dark: 'file:../../icons/probo.svg' },
12
+ group: ['input'],
13
+ version: 1,
14
+ subtitle: '={{$parameter["resource"]}} / {{$parameter["operation"]}}',
15
+ description: 'Consume data from the Probo API',
16
+ defaults: {
17
+ name: 'Probo',
18
+ },
19
+ usableAsTool: true,
20
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
21
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
22
+ credentials: [
23
+ {
24
+ name: 'proboApi',
25
+ required: true,
26
+ displayOptions: {
27
+ show: {
28
+ authentication: ['apiKey'],
29
+ },
30
+ },
31
+ },
32
+ ],
33
+ requestDefaults: {
34
+ headers: {
35
+ Accept: 'application/json',
36
+ 'Content-Type': 'application/json',
37
+ },
38
+ },
39
+ properties: [
40
+ {
41
+ displayName: 'Authentication',
42
+ name: 'authentication',
43
+ type: 'options',
44
+ options: [
45
+ {
46
+ name: 'API Key',
47
+ value: 'apiKey',
48
+ },
49
+ ],
50
+ default: 'apiKey',
51
+ },
52
+ {
53
+ displayName: 'Resource',
54
+ name: 'resource',
55
+ type: 'options',
56
+ noDataExpression: true,
57
+ options: [
58
+ {
59
+ name: 'Asset',
60
+ value: 'asset',
61
+ description: 'Manage assets',
62
+ },
63
+ {
64
+ name: 'Control',
65
+ value: 'control',
66
+ description: 'Manage controls',
67
+ },
68
+ {
69
+ name: 'Data',
70
+ value: 'datum',
71
+ description: 'Manage data',
72
+ },
73
+ {
74
+ name: 'Execute',
75
+ value: 'execute',
76
+ description: 'Execute a GraphQL query or mutation',
77
+ },
78
+ {
79
+ name: 'Framework',
80
+ value: 'framework',
81
+ description: 'Manage frameworks',
82
+ },
83
+ {
84
+ name: 'Measure',
85
+ value: 'measure',
86
+ description: 'Manage measures',
87
+ },
88
+ ],
89
+ default: 'execute',
90
+ },
91
+ ...(0, actions_1.getAllResourceOperations)(),
92
+ ...(0, actions_1.getAllResourceFields)(),
93
+ ],
94
+ };
95
+ this.methods = {
96
+ listSearch: {},
97
+ };
98
+ }
99
+ async execute() {
100
+ const items = this.getInputData();
101
+ const returnData = [];
102
+ for (let i = 0; i < items.length; i++) {
103
+ const resource = this.getNodeParameter('resource', i);
104
+ const operation = this.getNodeParameter('operation', i, 'execute');
105
+ const executeFunction = (0, actions_1.getExecuteFunction)(resource, operation);
106
+ const result = await executeFunction.call(this, i);
107
+ returnData.push(result);
108
+ }
109
+ return [returnData];
110
+ }
111
+ }
112
+ exports.Probo = Probo;
113
+ //# sourceMappingURL=Probo.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Probo.node.js","sourceRoot":"","sources":["../../../nodes/Probo/Probo.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AACtB,uCAImB;AAEnB,MAAa,KAAK;IAAlB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,EAAE,KAAK,EAAE,kCAAkC,EAAE,IAAI,EAAE,4BAA4B,EAAE;YACvF,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,2DAA2D;YACrE,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE;gBACT,IAAI,EAAE,OAAO;aACb;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;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,GAAE;aACzB;SACD,CAAC;QAkBF,YAAO,GAAG;YACT,UAAU,EAAE,EAAE;SACd,CAAC;IACH,CAAC;IAnBA,KAAK,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,UAAU,GAAyB,EAAE,CAAC;QAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;YAChE,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,CAAW,CAAC;YAE7E,MAAM,eAAe,GAAG,IAAA,4BAAkB,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;YAChE,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YACnD,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CAKD;AA5GD,sBA4GC"}
@@ -0,0 +1,19 @@
1
+ {
2
+ "node": "n8n-nodes-probo",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Development", "Developer Tools", "Automation"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "https://www.getprobo.com/docs"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "https://www.getprobo.com/docs"
15
+ }
16
+ ],
17
+ "generic": []
18
+ }
19
+ }
@@ -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,207 @@
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: 'Organization ID',
9
+ name: 'organizationId',
10
+ type: 'string',
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['asset'],
14
+ operation: ['create'],
15
+ },
16
+ },
17
+ default: '',
18
+ description: 'The ID of the organization',
19
+ required: true,
20
+ },
21
+ {
22
+ displayName: 'Name',
23
+ name: 'name',
24
+ type: 'string',
25
+ displayOptions: {
26
+ show: {
27
+ resource: ['asset'],
28
+ operation: ['create'],
29
+ },
30
+ },
31
+ default: '',
32
+ description: 'The name of the asset',
33
+ required: true,
34
+ },
35
+ {
36
+ displayName: 'Amount',
37
+ name: 'amount',
38
+ type: 'number',
39
+ displayOptions: {
40
+ show: {
41
+ resource: ['asset'],
42
+ operation: ['create'],
43
+ },
44
+ },
45
+ default: 1,
46
+ description: 'The amount of the asset',
47
+ required: true,
48
+ },
49
+ {
50
+ displayName: 'Owner ID',
51
+ name: 'ownerId',
52
+ type: 'string',
53
+ displayOptions: {
54
+ show: {
55
+ resource: ['asset'],
56
+ operation: ['create'],
57
+ },
58
+ },
59
+ default: '',
60
+ description: 'The ID of the owner (People)',
61
+ required: true,
62
+ },
63
+ {
64
+ displayName: 'Asset Type',
65
+ name: 'assetType',
66
+ type: 'options',
67
+ displayOptions: {
68
+ show: {
69
+ resource: ['asset'],
70
+ operation: ['create'],
71
+ },
72
+ },
73
+ options: [
74
+ {
75
+ name: 'Physical',
76
+ value: 'PHYSICAL',
77
+ },
78
+ {
79
+ name: 'Virtual',
80
+ value: 'VIRTUAL',
81
+ },
82
+ ],
83
+ default: 'PHYSICAL',
84
+ description: 'The type of the asset',
85
+ required: true,
86
+ },
87
+ {
88
+ displayName: 'Data Types Stored',
89
+ name: 'dataTypesStored',
90
+ type: 'string',
91
+ displayOptions: {
92
+ show: {
93
+ resource: ['asset'],
94
+ operation: ['create'],
95
+ },
96
+ },
97
+ default: '',
98
+ description: 'The types of data stored in the asset',
99
+ required: true,
100
+ },
101
+ {
102
+ displayName: 'Vendor IDs',
103
+ name: 'vendorIds',
104
+ type: 'string',
105
+ displayOptions: {
106
+ show: {
107
+ resource: ['asset'],
108
+ operation: ['create'],
109
+ },
110
+ },
111
+ default: '',
112
+ description: 'Comma-separated list of vendor IDs',
113
+ },
114
+ {
115
+ displayName: 'Options',
116
+ name: 'options',
117
+ type: 'collection',
118
+ placeholder: 'Add Option',
119
+ default: {},
120
+ displayOptions: {
121
+ show: {
122
+ resource: ['asset'],
123
+ operation: ['create'],
124
+ },
125
+ },
126
+ options: [
127
+ {
128
+ displayName: 'Include Owner',
129
+ name: 'includeOwner',
130
+ type: 'boolean',
131
+ default: false,
132
+ description: 'Whether to include owner details in the response',
133
+ },
134
+ {
135
+ displayName: 'Include Vendors',
136
+ name: 'includeVendors',
137
+ type: 'boolean',
138
+ default: false,
139
+ description: 'Whether to include vendors in the response',
140
+ },
141
+ ],
142
+ },
143
+ ];
144
+ async function execute(itemIndex) {
145
+ const organizationId = this.getNodeParameter('organizationId', itemIndex);
146
+ const name = this.getNodeParameter('name', itemIndex);
147
+ const amount = this.getNodeParameter('amount', itemIndex);
148
+ const ownerId = this.getNodeParameter('ownerId', itemIndex);
149
+ const assetType = this.getNodeParameter('assetType', itemIndex);
150
+ const dataTypesStored = this.getNodeParameter('dataTypesStored', itemIndex);
151
+ const vendorIdsStr = this.getNodeParameter('vendorIds', itemIndex, '');
152
+ const options = this.getNodeParameter('options', itemIndex, {});
153
+ const ownerFragment = options.includeOwner
154
+ ? `owner {
155
+ id
156
+ fullName
157
+ primaryEmailAddress
158
+ }`
159
+ : '';
160
+ const vendorsFragment = options.includeVendors
161
+ ? `vendors(first: 100) {
162
+ edges {
163
+ node {
164
+ id
165
+ name
166
+ }
167
+ }
168
+ }`
169
+ : '';
170
+ const query = `
171
+ mutation CreateAsset($input: CreateAssetInput!) {
172
+ createAsset(input: $input) {
173
+ assetEdge {
174
+ node {
175
+ id
176
+ name
177
+ amount
178
+ assetType
179
+ dataTypesStored
180
+ ${ownerFragment}
181
+ ${vendorsFragment}
182
+ createdAt
183
+ updatedAt
184
+ }
185
+ }
186
+ }
187
+ }
188
+ `;
189
+ const vendorIds = vendorIdsStr ? vendorIdsStr.split(',').map((id) => id.trim()).filter(Boolean) : undefined;
190
+ const variables = {
191
+ input: {
192
+ organizationId,
193
+ name,
194
+ amount,
195
+ ownerId,
196
+ assetType,
197
+ dataTypesStored,
198
+ ...(vendorIds && vendorIds.length > 0 && { vendorIds }),
199
+ },
200
+ };
201
+ const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, variables);
202
+ return {
203
+ json: responseData,
204
+ pairedItem: { item: itemIndex },
205
+ };
206
+ }
207
+ //# sourceMappingURL=create.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/asset/create.operation.ts"],"names":[],"mappings":";;;AA8IA,0BA2EC;AAxND,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,OAAO,CAAC;gBACnB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;QACzC,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,OAAO,CAAC;gBACnB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX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E,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,37 @@
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: 'Asset ID',
9
+ name: 'assetId',
10
+ type: 'string',
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['asset'],
14
+ operation: ['delete'],
15
+ },
16
+ },
17
+ default: '',
18
+ description: 'The ID of the asset to delete',
19
+ required: true,
20
+ },
21
+ ];
22
+ async function execute(itemIndex) {
23
+ const assetId = this.getNodeParameter('assetId', itemIndex);
24
+ const query = `
25
+ mutation DeleteAsset($input: DeleteAssetInput!) {
26
+ deleteAsset(input: $input) {
27
+ deletedAssetId
28
+ }
29
+ }
30
+ `;
31
+ const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input: { assetId } });
32
+ return {
33
+ json: responseData,
34
+ pairedItem: { item: itemIndex },
35
+ };
36
+ }
37
+ //# sourceMappingURL=delete.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/asset/delete.operation.ts"],"names":[],"mappings":";;;AAoBA,0BAoBC;AAvCD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,OAAO,CAAC;gBACnB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,+BAA+B;QAC5C,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAW,CAAC;IAEtE,MAAM,KAAK,GAAG;;;;;;EAMb,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,kCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IAErF,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,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>;