@thegraphitelab/n8n-nodes-toolbox 1.0.0 → 1.1.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 (183) hide show
  1. package/dist/core/handlers/execHandler.js +6 -7
  2. package/dist/core/handlers/execHandler.js.map +1 -1
  3. package/dist/core/handlers/pollHandler.js +6 -7
  4. package/dist/core/handlers/pollHandler.js.map +1 -1
  5. package/dist/core/handlers/utils.d.ts +6 -6
  6. package/dist/core/handlers/utils.js +11 -11
  7. package/dist/core/handlers/utils.js.map +1 -1
  8. package/dist/core/handlers/webhookHandler.d.ts +14 -0
  9. package/dist/core/handlers/webhookHandler.js +57 -0
  10. package/dist/core/handlers/webhookHandler.js.map +1 -0
  11. package/dist/core/parameters/utils.d.ts +14 -3
  12. package/dist/core/parameters/utils.js +63 -1
  13. package/dist/core/parameters/utils.js.map +1 -1
  14. package/dist/core/transport/index.d.ts +1 -12
  15. package/dist/core/transport/index.js +3 -42
  16. package/dist/core/transport/index.js.map +1 -1
  17. package/dist/core/transport/jerboa.d.ts +14 -0
  18. package/dist/core/transport/jerboa.js +89 -0
  19. package/dist/core/transport/jerboa.js.map +1 -0
  20. package/dist/core/transport/toolbox.d.ts +12 -0
  21. package/dist/core/transport/toolbox.js +18 -0
  22. package/dist/core/transport/toolbox.js.map +1 -0
  23. package/dist/core/transport/utils.d.ts +2 -0
  24. package/dist/core/transport/utils.js +31 -0
  25. package/dist/core/transport/utils.js.map +1 -0
  26. package/dist/core/utils/array.d.ts +1 -0
  27. package/dist/core/utils/array.js +9 -0
  28. package/dist/core/utils/array.js.map +1 -0
  29. package/dist/core/utils/file.d.ts +5 -0
  30. package/dist/core/utils/file.js +25 -0
  31. package/dist/core/utils/file.js.map +1 -0
  32. package/dist/core/utils/string.d.ts +2 -0
  33. package/dist/core/utils/string.js +10 -0
  34. package/dist/core/utils/string.js.map +1 -0
  35. package/dist/credentials/JerboaApi.credentials.d.ts +10 -0
  36. package/dist/credentials/JerboaApi.credentials.js +28 -0
  37. package/dist/credentials/JerboaApi.credentials.js.map +1 -0
  38. package/dist/nodes/CallIQ/v1/CallIqPollTriggerV1.node.js +0 -1
  39. package/dist/nodes/CallIQ/v1/CallIqPollTriggerV1.node.js.map +1 -1
  40. package/dist/nodes/CallIQ/v1/actions/call/get/description.js +1 -1
  41. package/dist/nodes/CallIQ/v1/actions/call/get/execution.js +2 -2
  42. package/dist/nodes/CallIQ/v1/actions/call/get/execution.js.map +1 -1
  43. package/dist/nodes/CallIQ/v1/triggers/poll/onCallCompletion/description.js +1 -1
  44. package/dist/nodes/CallIQ/v1/triggers/poll/onCallCompletion/polling.js +1 -1
  45. package/dist/nodes/CallIQ/v1/triggers/poll/onCallCompletion/polling.js.map +1 -1
  46. package/dist/nodes/PurchasingAssistant/PurchasingAssistant.node.d.ts +4 -0
  47. package/dist/nodes/PurchasingAssistant/PurchasingAssistant.node.js +24 -0
  48. package/dist/nodes/PurchasingAssistant/PurchasingAssistant.node.js.map +1 -0
  49. package/dist/nodes/PurchasingAssistant/PurchasingAssistant.node.json +18 -0
  50. package/dist/nodes/PurchasingAssistant/PurchasingAssistantWhTrigger.node.d.ts +4 -0
  51. package/dist/nodes/PurchasingAssistant/PurchasingAssistantWhTrigger.node.js +24 -0
  52. package/dist/nodes/PurchasingAssistant/PurchasingAssistantWhTrigger.node.js.map +1 -0
  53. package/dist/nodes/PurchasingAssistant/PurchasingAssistantWhTrigger.node.json +18 -0
  54. package/dist/nodes/PurchasingAssistant/eli.svg +106 -0
  55. package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantV1.node.d.ts +6 -0
  56. package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantV1.node.js +68 -0
  57. package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantV1.node.js.map +1 -0
  58. package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantWhTriggerV1.node.d.ts +13 -0
  59. package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantWhTriggerV1.node.js +66 -0
  60. package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantWhTriggerV1.node.js.map +1 -0
  61. package/dist/nodes/PurchasingAssistant/v1/actions/index.d.ts +20 -0
  62. package/dist/nodes/PurchasingAssistant/v1/actions/index.js +30 -0
  63. package/dist/nodes/PurchasingAssistant/v1/actions/index.js.map +1 -0
  64. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/const.d.ts +2 -0
  65. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/const.js +6 -0
  66. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/const.js.map +1 -0
  67. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/description.d.ts +29 -0
  68. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/description.js +20 -0
  69. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/description.js.map +1 -0
  70. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/execution.d.ts +6 -0
  71. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/execution.js +39 -0
  72. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/execution.js.map +1 -0
  73. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/description.d.ts +29 -0
  74. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/description.js +19 -0
  75. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/description.js.map +1 -0
  76. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/execution.d.ts +6 -0
  77. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/execution.js +16 -0
  78. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/execution.js.map +1 -0
  79. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/description.d.ts +29 -0
  80. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/description.js +19 -0
  81. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/description.js.map +1 -0
  82. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/execution.d.ts +6 -0
  83. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/execution.js +23 -0
  84. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/execution.js.map +1 -0
  85. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/index.d.ts +13 -0
  86. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/index.js +51 -0
  87. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/index.js.map +1 -0
  88. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/description.d.ts +29 -0
  89. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/description.js +23 -0
  90. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/description.js.map +1 -0
  91. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/execution.d.ts +6 -0
  92. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/execution.js +35 -0
  93. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/execution.js.map +1 -0
  94. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/utils.d.ts +10 -0
  95. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/utils.js +21 -0
  96. package/dist/nodes/PurchasingAssistant/v1/actions/transaction/utils.js.map +1 -0
  97. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/const.d.ts +2 -0
  98. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/const.js +6 -0
  99. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/const.js.map +1 -0
  100. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/description.d.ts +29 -0
  101. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/description.js +23 -0
  102. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/description.js.map +1 -0
  103. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/execution.d.ts +6 -0
  104. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/execution.js +24 -0
  105. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/execution.js.map +1 -0
  106. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/description.d.ts +29 -0
  107. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/description.js +19 -0
  108. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/description.js.map +1 -0
  109. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/execution.d.ts +6 -0
  110. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/execution.js +23 -0
  111. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/execution.js.map +1 -0
  112. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/description.d.ts +29 -0
  113. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/description.js +27 -0
  114. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/description.js.map +1 -0
  115. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/execution.d.ts +6 -0
  116. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/execution.js +23 -0
  117. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/execution.js.map +1 -0
  118. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/index.d.ts +13 -0
  119. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/index.js +51 -0
  120. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/index.js.map +1 -0
  121. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/description.d.ts +29 -0
  122. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/description.js +19 -0
  123. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/description.js.map +1 -0
  124. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/execution.d.ts +6 -0
  125. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/execution.js +22 -0
  126. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/execution.js.map +1 -0
  127. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/utils.d.ts +1 -0
  128. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/utils.js +7 -0
  129. package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/utils.js.map +1 -0
  130. package/dist/nodes/PurchasingAssistant/v1/parameters/index.d.ts +3 -0
  131. package/dist/nodes/PurchasingAssistant/v1/parameters/index.js +68 -0
  132. package/dist/nodes/PurchasingAssistant/v1/parameters/index.js.map +1 -0
  133. package/dist/nodes/PurchasingAssistant/v1/parameters/options.d.ts +22 -0
  134. package/dist/nodes/PurchasingAssistant/v1/parameters/options.js +34 -0
  135. package/dist/nodes/PurchasingAssistant/v1/parameters/options.js.map +1 -0
  136. package/dist/nodes/PurchasingAssistant/v1/parameters/types.d.ts +1 -0
  137. package/dist/nodes/PurchasingAssistant/v1/parameters/types.js +3 -0
  138. package/dist/nodes/PurchasingAssistant/v1/parameters/types.js.map +1 -0
  139. package/dist/nodes/PurchasingAssistant/v1/triggers/index.d.ts +8 -0
  140. package/dist/nodes/PurchasingAssistant/v1/triggers/index.js +26 -0
  141. package/dist/nodes/PurchasingAssistant/v1/triggers/index.js.map +1 -0
  142. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/index.d.ts +3 -0
  143. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/index.js +23 -0
  144. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/index.js.map +1 -0
  145. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/description.d.ts +3 -0
  146. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/description.js +15 -0
  147. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/description.js.map +1 -0
  148. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/webhookMethods.d.ts +1 -0
  149. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/webhookMethods.js +10 -0
  150. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/webhookMethods.js.map +1 -0
  151. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/description.d.ts +3 -0
  152. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/description.js +16 -0
  153. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/description.js.map +1 -0
  154. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/webhookMethods.d.ts +3 -0
  155. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/webhookMethods.js +14 -0
  156. package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/webhookMethods.js.map +1 -0
  157. package/dist/nodes/Toolbox/eli.svg +51 -106
  158. package/dist/nodes/Toolbox/v1/transport/index.js +0 -2
  159. package/dist/nodes/Toolbox/v1/transport/index.js.map +1 -1
  160. package/dist/nodes/Webhooks/v1/WebhooksV1.node.js +0 -1
  161. package/dist/nodes/Webhooks/v1/WebhooksV1.node.js.map +1 -1
  162. package/dist/nodes/Webhooks/v1/actions/webhookInstance/create/description.js +2 -2
  163. package/dist/nodes/Webhooks/v1/actions/webhookInstance/create/description.js.map +1 -1
  164. package/dist/nodes/Webhooks/v1/actions/webhookInstance/create/execution.js +3 -3
  165. package/dist/nodes/Webhooks/v1/actions/webhookInstance/create/execution.js.map +1 -1
  166. package/dist/nodes/Webhooks/v1/actions/webhookInstance/deactivate/description.js +1 -1
  167. package/dist/nodes/Webhooks/v1/actions/webhookInstance/deactivate/execution.js +2 -2
  168. package/dist/nodes/Webhooks/v1/actions/webhookInstance/deactivate/execution.js.map +1 -1
  169. package/dist/nodes/Webhooks/v1/actions/webhookInstance/get/description.js +1 -1
  170. package/dist/nodes/Webhooks/v1/actions/webhookInstance/get/execution.js +3 -3
  171. package/dist/nodes/Webhooks/v1/actions/webhookInstance/get/execution.js.map +1 -1
  172. package/dist/nodes/Webhooks/v1/actions/webhookInstance/update/description.js +1 -1
  173. package/dist/nodes/Webhooks/v1/actions/webhookInstance/update/execution.js +3 -3
  174. package/dist/nodes/Webhooks/v1/actions/webhookInstance/update/execution.js.map +1 -1
  175. package/dist/nodes/Webhooks/v1/methods/loadOptions.js +1 -1
  176. package/dist/nodes/Webhooks/v1/methods/loadOptions.js.map +1 -1
  177. package/dist/nodes/Webhooks/v1/methods/resourceMapping.js +1 -1
  178. package/dist/nodes/Webhooks/v1/methods/resourceMapping.js.map +1 -1
  179. package/dist/nodes/Webhooks/v1/triggers/webhook/onWebhookEvent/description.js +1 -1
  180. package/dist/nodes/Webhooks/v1/triggers/webhook/onWebhookEvent/webhookMethods.js +2 -2
  181. package/dist/nodes/Webhooks/v1/triggers/webhook/onWebhookEvent/webhookMethods.js.map +1 -1
  182. package/dist/package.json +8 -2
  183. package/package.json +8 -2
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transactionType = exports.transactionStatusMultiOptional = exports.transactionStatusOptional = exports.transactionStatus = exports.transactionStatusOptions = exports.transactionTypesOptions = void 0;
4
+ const utils_1 = require("../../../../core/parameters/utils");
5
+ const transactionTypes = {
6
+ bill: "Bill",
7
+ credit: "Credit",
8
+ delivery: "Delivery",
9
+ orderAck: "Order Acknowledgement",
10
+ purchaseOrder: "Purchase Order",
11
+ receipt: "Receipt",
12
+ statement: "Statement",
13
+ other: "Other",
14
+ };
15
+ exports.transactionTypesOptions = Object.entries(transactionTypes).map(([key, value]) => ({ name: key, value }));
16
+ const transactionStatuses = {
17
+ Confirmed: "CONFIRMED",
18
+ Unconfirmed: "UNCONFIRMED",
19
+ Paid: "PAID",
20
+ Issue: "ISSUE",
21
+ Completed: "COMPLETED",
22
+ Archived: "ARCHIVED",
23
+ };
24
+ exports.transactionStatusOptions = Object.entries(transactionStatuses).map(([key, value]) => ({ name: key, value }));
25
+ const { options: transactionStatus, // for TRIGGER
26
+ optionalOptions: transactionStatusOptional, // for UPDATE
27
+ multiOptionalOptions: transactionStatusMultiOptional, // for GET MANY
28
+ } = (0, utils_1.deriveAllOptionTypes)("Transaction Status", "transactionStatus", exports.transactionStatusOptions);
29
+ exports.transactionStatus = transactionStatus;
30
+ exports.transactionStatusOptional = transactionStatusOptional;
31
+ exports.transactionStatusMultiOptional = transactionStatusMultiOptional;
32
+ const { options: transactionType } = (0, utils_1.deriveAllOptionTypes)("Transaction Type", "transactionType", exports.transactionTypesOptions, "Invoice");
33
+ exports.transactionType = transactionType;
34
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../../nodes/PurchasingAssistant/v1/parameters/options.ts"],"names":[],"mappings":";;;AAAA,6DAAyE;AAEzE,MAAM,gBAAgB,GAAG;IACrB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,uBAAuB;IACjC,aAAa,EAAE,gBAAgB;IAC/B,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;CACjB,CAAC;AACW,QAAA,uBAAuB,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,GAAG,CACvE,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAC3C,CAAC;AAEF,MAAM,mBAAmB,GAAG;IACxB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;CACd,CAAC;AACE,QAAA,wBAAwB,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAC3E,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAC3C,CAAC;AAOF,MAAM,EACF,OAAO,EAAE,iBAAiB,EAAE,cAAc;AAC1C,eAAe,EAAE,yBAAyB,EAAE,aAAa;AACzD,oBAAoB,EAAE,8BAA8B,EAAE,eAAe;EACxE,GAAG,IAAA,4BAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,gCAAwB,CAC3B,CAAC;AAUE,8CAAiB;AACjB,8DAAyB;AACzB,wEAA8B;AAVlC,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,IAAA,4BAAoB,EACrD,kBAAkB,EAClB,iBAAiB,EACjB,+BAAuB,EACvB,SAAS,CACZ,CAAC;AAME,0CAAe"}
@@ -0,0 +1 @@
1
+ export type ParamKeys = "createdOnOrAfter" | "createdBefore" | "transactionID" | "transactionGroupID" | "transactionStatus" | "transactionStatusOptional" | "transactionStatusMultiOptional" | "transactionType" | "transactionFileKey" | "transactionFileName" | "transactionSource" | "transactionNoteID" | "transactionNoteContent";
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../nodes/PurchasingAssistant/v1/parameters/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export { properties } from "./webhook";
2
+ export declare const webhookMethods: {
3
+ default: {
4
+ checkExists(this: import("n8n-workflow").IHookFunctions): Promise<boolean>;
5
+ create(this: import("n8n-workflow").IHookFunctions): Promise<boolean>;
6
+ delete(this: import("n8n-workflow").IHookFunctions): Promise<boolean>;
7
+ };
8
+ };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webhookMethods = exports.properties = void 0;
4
+ /* eslint-disable @n8n/community-nodes/no-restricted-imports */
5
+ const n8n_utils_1 = require("@thegraphitelab/n8n-utils");
6
+ var webhook_1 = require("./webhook");
7
+ Object.defineProperty(exports, "properties", { enumerable: true, get: function () { return webhook_1.properties; } });
8
+ // triggers/webhook/index.ts
9
+ exports.webhookMethods = (0, n8n_utils_1.webhookHandler)({
10
+ onTransactionCreation: {
11
+ webhookTypeName: "AIBPA:onTransactionCreation",
12
+ getFilterCriteria: (clientSettings) => {
13
+ return Object.fromEntries(clientSettings.map(({ clientID }) => [clientID, {}]));
14
+ },
15
+ },
16
+ onTransactionStatusChange: {
17
+ webhookTypeName: "AIBPA:onTransactionStatusChange",
18
+ getFilterCriteria: (clientSettings) => {
19
+ return Object.fromEntries(clientSettings.map(({ clientID, transactionStatus }) => [
20
+ clientID,
21
+ { status: [transactionStatus] },
22
+ ]));
23
+ },
24
+ },
25
+ });
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/PurchasingAssistant/v1/triggers/index.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;AAC/D,yDAA2D;AAI3D,qCAAuC;AAA9B,qGAAA,UAAU,OAAA;AAEnB,4BAA4B;AACf,QAAA,cAAc,GAAG,IAAA,0BAAc,EAGzC;IACC,qBAAqB,EAAE;QACnB,eAAe,EAAE,6BAA6B;QAC9C,iBAAiB,EAAE,CAAC,cAAc,EAAE,EAAE;YAClC,OAAO,MAAM,CAAC,WAAW,CACrB,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CACvD,CAAC;QACN,CAAC;KACJ;IACD,yBAAyB,EAAE;QACvB,eAAe,EAAE,iCAAiC;QAClD,iBAAiB,EAAE,CAAC,cAAc,EAAE,EAAE;YAClC,OAAO,MAAM,CAAC,WAAW,CACrB,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;gBACpD,QAAQ;gBACR,EAAE,MAAM,EAAE,CAAC,iBAAiB,CAAC,EAAE;aAClC,CAAC,CACL,CAAC;QACN,CAAC;KACJ;CACJ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { INodeProperties } from "n8n-workflow";
2
+ declare const properties: INodeProperties[];
3
+ export { properties };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.properties = void 0;
4
+ const description_1 = require("./onTransactionStatusChange/description");
5
+ const description_2 = require("./onTransactionCreation/description");
6
+ const properties = [
7
+ {
8
+ displayName: "Events",
9
+ name: "event",
10
+ type: "options",
11
+ noDataExpression: true,
12
+ //TODO: enforce this being a specific type
13
+ default: "onTransactionStatusChange",
14
+ options: [
15
+ description_1.onTransactionStatusChangeEventOptions,
16
+ description_2.onTransactionCreationEventOptions,
17
+ ],
18
+ },
19
+ ...description_1.onTransactionStatusChangeEventDesc,
20
+ ...description_2.onTransactionCreationEventDesc,
21
+ ];
22
+ exports.properties = properties;
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/PurchasingAssistant/v1/triggers/webhook/index.ts"],"names":[],"mappings":";;;AAEA,yEAGiD;AAEjD,qEAG6C;AAE7C,MAAM,UAAU,GAAsB;IAClC;QACI,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,0CAA0C;QAC1C,OAAO,EAAE,2BAA2B;QACpC,OAAO,EAAE;YACL,mDAAqC;YACrC,+CAAiC;SACpC;KACJ;IACD,GAAG,gDAAkC;IACrC,GAAG,4CAA8B;CACpC,CAAC;AAEO,gCAAU"}
@@ -0,0 +1,3 @@
1
+ import { INodePropertyOptions } from "n8n-workflow";
2
+ export declare const onTransactionCreationEventDesc: import("n8n-workflow").INodeProperties[];
3
+ export declare const onTransactionCreationEventOptions: INodePropertyOptions;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.onTransactionCreationEventOptions = exports.onTransactionCreationEventDesc = void 0;
4
+ /* eslint-disable @n8n/community-nodes/no-restricted-imports */
5
+ const n8n_utils_1 = require("@thegraphitelab/n8n-utils");
6
+ exports.onTransactionCreationEventDesc = (0, n8n_utils_1.getWebhookDescription)({
7
+ mainParameters: [],
8
+ displayOptions: { show: { event: ["onTransactionCreation"] } },
9
+ });
10
+ exports.onTransactionCreationEventOptions = {
11
+ name: "On Transaction Creation",
12
+ value: "onTransactionCreation",
13
+ action: "Subscribe to new transactions",
14
+ };
15
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/description.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;AAC/D,yDAAkE;AAGrD,QAAA,8BAA8B,GAAG,IAAA,iCAAqB,EAAC;IAChE,cAAc,EAAE,EAAE;IAClB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,uBAAuB,CAAC,EAAE,EAAE;CACjE,CAAC,CAAC;AACU,QAAA,iCAAiC,GAAyB;IACnE,IAAI,EAAE,yBAAyB;IAC/B,KAAK,EAAE,uBAAuB;IAC9B,MAAM,EAAE,+BAA+B;CAC1C,CAAC"}
@@ -0,0 +1 @@
1
+ export type OnTransactionCreationFilterCriteria = Record<string, never>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // export const webhookMethods = webhookHandler<OnTransactionCreation>({
4
+ // getFilterCriteria: (clientSettings) => {
5
+ // return Object.fromEntries(
6
+ // clientSettings.map(({ clientID }) => [clientID, { status: {} }]),
7
+ // );
8
+ // },
9
+ // });
10
+ //# sourceMappingURL=webhookMethods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhookMethods.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/webhookMethods.ts"],"names":[],"mappings":";;AAEA,wEAAwE;AACxE,+CAA+C;AAC/C,qCAAqC;AACrC,gFAAgF;AAChF,aAAa;AACb,SAAS;AACT,MAAM"}
@@ -0,0 +1,3 @@
1
+ import { INodePropertyOptions } from "n8n-workflow";
2
+ export declare const onTransactionStatusChangeEventDesc: import("n8n-workflow").INodeProperties[];
3
+ export declare const onTransactionStatusChangeEventOptions: INodePropertyOptions;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.onTransactionStatusChangeEventOptions = exports.onTransactionStatusChangeEventDesc = void 0;
4
+ /* eslint-disable @n8n/community-nodes/no-restricted-imports */
5
+ const n8n_utils_1 = require("@thegraphitelab/n8n-utils");
6
+ const parameters_1 = require("../../../parameters");
7
+ exports.onTransactionStatusChangeEventDesc = (0, n8n_utils_1.getWebhookDescription)({
8
+ mainParameters: [parameters_1.params.transactionStatus],
9
+ displayOptions: { show: { event: ["onTransactionStatusChange"] } },
10
+ });
11
+ exports.onTransactionStatusChangeEventOptions = {
12
+ name: "On Transaction Status Change",
13
+ value: "onTransactionStatusChange",
14
+ action: "Subscribe to changes in transaction status",
15
+ };
16
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/description.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;AAC/D,yDAAkE;AAElE,oDAA6C;AAEhC,QAAA,kCAAkC,GAAG,IAAA,iCAAqB,EAAC;IACpE,cAAc,EAAE,CAAC,mBAAM,CAAC,iBAAiB,CAAC;IAC1C,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,2BAA2B,CAAC,EAAE,EAAE;CACrE,CAAC,CAAC;AACU,QAAA,qCAAqC,GAAyB;IACvE,IAAI,EAAE,8BAA8B;IACpC,KAAK,EAAE,2BAA2B;IAClC,MAAM,EAAE,4CAA4C;CACvD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type OnTransactionStatusChangeFilterCriteria = {
2
+ transactionStatus: string;
3
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ // export const webhookMethods =
3
+ // webhookHandler<OnTransactionStatusChangeFilterCriteria>({
4
+ // getFilterCriteria: (clientSettings) => {
5
+ // return Object.fromEntries(
6
+ // clientSettings.map(({ clientID, transactionStatus }) => [
7
+ // clientID,
8
+ // { status: [transactionStatus] },
9
+ // ]),
10
+ // );
11
+ // },
12
+ // });
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ //# sourceMappingURL=webhookMethods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhookMethods.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/webhookMethods.ts"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,gEAAgE;AAChE,mDAAmD;AACnD,yCAAyC;AACzC,4EAA4E;AAC5E,gCAAgC;AAChC,uDAAuD;AACvD,sBAAsB;AACtB,iBAAiB;AACjB,aAAa;AACb,UAAU"}