@thegraphitelab/n8n-nodes-toolbox 1.0.1 → 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.
- package/dist/core/handlers/utils.d.ts +1 -1
- package/dist/core/handlers/utils.js.map +1 -1
- package/dist/core/handlers/webhookHandler.d.ts +14 -0
- package/dist/core/handlers/webhookHandler.js +57 -0
- package/dist/core/handlers/webhookHandler.js.map +1 -0
- package/dist/core/parameters/utils.d.ts +14 -3
- package/dist/core/parameters/utils.js +63 -1
- package/dist/core/parameters/utils.js.map +1 -1
- package/dist/core/transport/index.d.ts +1 -12
- package/dist/core/transport/index.js +3 -40
- package/dist/core/transport/index.js.map +1 -1
- package/dist/core/transport/jerboa.d.ts +14 -0
- package/dist/core/transport/jerboa.js +89 -0
- package/dist/core/transport/jerboa.js.map +1 -0
- package/dist/core/transport/toolbox.d.ts +12 -0
- package/dist/core/transport/toolbox.js +18 -0
- package/dist/core/transport/toolbox.js.map +1 -0
- package/dist/core/transport/utils.d.ts +2 -0
- package/dist/core/transport/utils.js +31 -0
- package/dist/core/transport/utils.js.map +1 -0
- package/dist/core/utils/array.d.ts +1 -0
- package/dist/core/utils/array.js +9 -0
- package/dist/core/utils/array.js.map +1 -0
- package/dist/core/utils/file.d.ts +5 -0
- package/dist/core/utils/file.js +25 -0
- package/dist/core/utils/file.js.map +1 -0
- package/dist/core/utils/string.d.ts +2 -0
- package/dist/core/utils/string.js +10 -0
- package/dist/core/utils/string.js.map +1 -0
- package/dist/credentials/JerboaApi.credentials.d.ts +10 -0
- package/dist/credentials/JerboaApi.credentials.js +28 -0
- package/dist/credentials/JerboaApi.credentials.js.map +1 -0
- package/dist/nodes/CallIQ/v1/actions/call/get/description.js +1 -1
- package/dist/nodes/CallIQ/v1/triggers/poll/onCallCompletion/description.js +1 -1
- package/dist/nodes/PurchasingAssistant/PurchasingAssistant.node.d.ts +4 -0
- package/dist/nodes/PurchasingAssistant/PurchasingAssistant.node.js +24 -0
- package/dist/nodes/PurchasingAssistant/PurchasingAssistant.node.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/PurchasingAssistant.node.json +18 -0
- package/dist/nodes/PurchasingAssistant/PurchasingAssistantWhTrigger.node.d.ts +4 -0
- package/dist/nodes/PurchasingAssistant/PurchasingAssistantWhTrigger.node.js +24 -0
- package/dist/nodes/PurchasingAssistant/PurchasingAssistantWhTrigger.node.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/PurchasingAssistantWhTrigger.node.json +18 -0
- package/dist/nodes/PurchasingAssistant/eli.svg +106 -0
- package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantV1.node.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantV1.node.js +68 -0
- package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantV1.node.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantWhTriggerV1.node.d.ts +13 -0
- package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantWhTriggerV1.node.js +66 -0
- package/dist/nodes/PurchasingAssistant/v1/PurchasingAssistantWhTriggerV1.node.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/index.d.ts +20 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/index.js +30 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/index.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/const.d.ts +2 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/const.js +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/const.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/description.d.ts +29 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/description.js +20 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/execution.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/execution.js +39 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/create/execution.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/description.d.ts +29 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/description.js +19 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/execution.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/execution.js +16 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/get/execution.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/description.d.ts +29 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/description.js +19 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/execution.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/execution.js +23 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/getMany/execution.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/index.d.ts +13 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/index.js +51 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/index.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/description.d.ts +29 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/description.js +23 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/execution.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/execution.js +35 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/update/execution.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/utils.d.ts +10 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/utils.js +21 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transaction/utils.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/const.d.ts +2 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/const.js +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/const.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/description.d.ts +29 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/description.js +23 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/execution.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/execution.js +24 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/create/execution.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/description.d.ts +29 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/description.js +19 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/execution.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/execution.js +23 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/get/execution.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/description.d.ts +29 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/description.js +27 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/execution.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/execution.js +23 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/getMany/execution.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/index.d.ts +13 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/index.js +51 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/index.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/description.d.ts +29 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/description.js +19 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/execution.d.ts +6 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/execution.js +22 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/update/execution.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/utils.d.ts +1 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/utils.js +7 -0
- package/dist/nodes/PurchasingAssistant/v1/actions/transactionNote/utils.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/index.d.ts +3 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/index.js +68 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/index.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/options.d.ts +22 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/options.js +34 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/options.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/types.d.ts +1 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/types.js +3 -0
- package/dist/nodes/PurchasingAssistant/v1/parameters/types.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/index.d.ts +8 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/index.js +26 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/index.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/index.d.ts +3 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/index.js +23 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/index.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/description.d.ts +3 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/description.js +15 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/webhookMethods.d.ts +1 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/webhookMethods.js +10 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionCreation/webhookMethods.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/description.d.ts +3 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/description.js +16 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/description.js.map +1 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/webhookMethods.d.ts +3 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/webhookMethods.js +14 -0
- package/dist/nodes/PurchasingAssistant/v1/triggers/webhook/onTransactionStatusChange/webhookMethods.js.map +1 -0
- package/dist/nodes/Toolbox/eli.svg +51 -106
- package/dist/nodes/Webhooks/v1/actions/webhookInstance/create/description.js +2 -2
- package/dist/nodes/Webhooks/v1/actions/webhookInstance/create/description.js.map +1 -1
- package/dist/nodes/Webhooks/v1/actions/webhookInstance/deactivate/description.js +1 -1
- package/dist/nodes/Webhooks/v1/actions/webhookInstance/get/description.js +1 -1
- package/dist/nodes/Webhooks/v1/actions/webhookInstance/update/description.js +1 -1
- package/dist/nodes/Webhooks/v1/triggers/webhook/onWebhookEvent/description.js +1 -1
- package/dist/package.json +8 -2
- package/package.json +8 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { INodePropertyOptions } from "n8n-workflow";
|
|
2
|
+
export declare const descriptionGet: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow/dist/esm/interfaces").INodePropertyOptions | import("n8n-workflow").INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const optionsGet: INodePropertyOptions;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optionsGet = exports.descriptionGet = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/parameters/utils");
|
|
5
|
+
const parameters_1 = require("../../../parameters");
|
|
6
|
+
const const_1 = require("../const");
|
|
7
|
+
exports.descriptionGet = (0, utils_1.getDescription)({
|
|
8
|
+
mainParameters: [parameters_1.params.transactionID],
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: { resource: [const_1.RESOURCE_VALUE], operation: ["get"] },
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
exports.optionsGet = {
|
|
14
|
+
name: "Get",
|
|
15
|
+
value: "get",
|
|
16
|
+
description: "Retrieve a transaction from Purchasing Assistant",
|
|
17
|
+
action: "Get a transaction",
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transaction/get/description.ts"],"names":[],"mappings":";;;AACA,mEAAyE;AACzE,oDAA6C;AAC7C,oCAA0C;AAE7B,QAAA,cAAc,GAAG,IAAA,sBAAc,EAAC;IACzC,cAAc,EAAE,CAAC,mBAAM,CAAC,aAAa,CAAC;IACtC,cAAc,EAAE;QACZ,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,sBAAc,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE;KAC3D;CACJ,CAAC,CAAC;AAEU,QAAA,UAAU,GAAyB;IAC5C,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,kDAAkD;IAC/D,MAAM,EAAE,mBAAmB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.operationGet = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/handlers/utils");
|
|
5
|
+
const transport_1 = require("../../../../../../core/transport");
|
|
6
|
+
const utils_2 = require("../utils");
|
|
7
|
+
async function getExec(index) {
|
|
8
|
+
const transactionID = utils_2.getParamTransactionID.call(this, index);
|
|
9
|
+
const result = await (0, transport_1.toolboxApiRequest)(this, {
|
|
10
|
+
method: "GET",
|
|
11
|
+
endpoint: `invoicefromfile/${transactionID}`,
|
|
12
|
+
});
|
|
13
|
+
return (0, utils_1.constructExecutionMetaData)(this, index, result);
|
|
14
|
+
}
|
|
15
|
+
exports.operationGet = { get: getExec };
|
|
16
|
+
//# sourceMappingURL=execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transaction/get/execution.ts"],"names":[],"mappings":";;;AACA,iEAAmF;AACnF,gEAAqE;AACrE,oCAAiD;AAEjD,KAAK,UAAU,OAAO,CAElB,KAAa;IAEb,MAAM,aAAa,GAAG,6BAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAE9D,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAiB,EAAC,IAAI,EAAE;QACzC,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,mBAAmB,aAAa,EAAE;KAC/C,CAAC,CAAC;IAEH,OAAO,IAAA,kCAA0B,EAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3D,CAAC;AAEY,QAAA,YAAY,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { INodePropertyOptions } from "n8n-workflow";
|
|
2
|
+
export declare const descriptionGetMany: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow/dist/esm/interfaces").INodePropertyOptions | import("n8n-workflow").INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const optionsGetMany: INodePropertyOptions;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optionsGetMany = exports.descriptionGetMany = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/parameters/utils");
|
|
5
|
+
const parameters_1 = require("../../../parameters");
|
|
6
|
+
const const_1 = require("../const");
|
|
7
|
+
exports.descriptionGetMany = (0, utils_1.getDescription)({
|
|
8
|
+
mainParameters: [parameters_1.params.transactionStatusMultiOptional],
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: { resource: [const_1.RESOURCE_VALUE], operation: ["getMany"] },
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
exports.optionsGetMany = {
|
|
14
|
+
name: "Get Many",
|
|
15
|
+
value: "getMany",
|
|
16
|
+
description: "Retrieves all transactions from Purchasing Assistant, with an optional status filter",
|
|
17
|
+
action: "Get many transactions",
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transaction/getMany/description.ts"],"names":[],"mappings":";;;AACA,mEAAyE;AACzE,oDAA6C;AAC7C,oCAA0C;AAE7B,QAAA,kBAAkB,GAAG,IAAA,sBAAc,EAAC;IAC7C,cAAc,EAAE,CAAC,mBAAM,CAAC,8BAA8B,CAAC;IACvD,cAAc,EAAE;QACZ,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,sBAAc,CAAC,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE;KAC/D;CACJ,CAAC,CAAC;AAEU,QAAA,cAAc,GAAyB;IAChD,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,SAAS;IAChB,WAAW,EACP,sFAAsF;IAC1F,MAAM,EAAE,uBAAuB;CAClC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, NodeExecutionWithMetadata } from "n8n-workflow";
|
|
2
|
+
declare function getManyExec(this: IExecuteFunctions, index: number): Promise<NodeExecutionWithMetadata[]>;
|
|
3
|
+
export declare const operationGetMany: {
|
|
4
|
+
getMany: typeof getManyExec;
|
|
5
|
+
};
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.operationGetMany = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/handlers/utils");
|
|
5
|
+
const transport_1 = require("../../../../../../core/transport");
|
|
6
|
+
const utils_2 = require("../utils");
|
|
7
|
+
async function getByStatus(status) {
|
|
8
|
+
return await (0, transport_1.toolboxApiRequest)(this, {
|
|
9
|
+
method: "GET",
|
|
10
|
+
endpoint: `invoicefromfile`,
|
|
11
|
+
qs: { status },
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
async function getManyExec(index) {
|
|
15
|
+
const statuses = utils_2.getParamStatusMultiOptional.call(this, index);
|
|
16
|
+
const statusFetches = statuses.map((status) => async () => {
|
|
17
|
+
return await getByStatus.call(this, status);
|
|
18
|
+
});
|
|
19
|
+
const allTransactions = (await Promise.all(statusFetches.map((fn) => fn()))).flat();
|
|
20
|
+
return (0, utils_1.constructExecutionMetaData)(this, index, allTransactions);
|
|
21
|
+
}
|
|
22
|
+
exports.operationGetMany = { getMany: getManyExec };
|
|
23
|
+
//# sourceMappingURL=execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transaction/getMany/execution.ts"],"names":[],"mappings":";;;AACA,iEAAmF;AACnF,gEAAqE;AACrE,oCAAuD;AAGvD,KAAK,UAAU,WAAW,CAEtB,MAA8B;IAE9B,OAAO,MAAM,IAAA,6BAAiB,EAAC,IAAI,EAAE;QACjC,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,iBAAiB;QAC3B,EAAE,EAAE,EAAE,MAAM,EAAE;KACjB,CAAC,CAAC;AACP,CAAC;AAED,KAAK,UAAU,WAAW,CAEtB,KAAa;IAEb,MAAM,QAAQ,GAAG,mCAA2B,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAE/D,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE;QACtD,OAAO,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,CACpB,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CACrD,CAAC,IAAI,EAAE,CAAC;IAET,OAAO,IAAA,kCAA0B,EAAC,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AACpE,CAAC;AAEY,QAAA,gBAAgB,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { INodeProperties } from "n8n-workflow";
|
|
2
|
+
export declare const transactionDescription: INodeProperties[];
|
|
3
|
+
export declare const transactionOperations: {
|
|
4
|
+
transaction: {
|
|
5
|
+
update: (this: import("n8n-workflow").IExecuteFunctions, index: number) => Promise<import("n8n-workflow").NodeExecutionWithMetadata[]>;
|
|
6
|
+
getMany: (this: import("n8n-workflow").IExecuteFunctions, index: number) => Promise<import("n8n-workflow").NodeExecutionWithMetadata[]>;
|
|
7
|
+
get: (this: import("n8n-workflow").IExecuteFunctions, index: number) => Promise<import("n8n-workflow").NodeExecutionWithMetadata[]>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const transactionOptions: {
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transactionOptions = exports.transactionOperations = exports.transactionDescription = void 0;
|
|
4
|
+
const const_1 = require("./const");
|
|
5
|
+
const execution_1 = require("./get/execution");
|
|
6
|
+
const execution_2 = require("./update/execution");
|
|
7
|
+
const execution_3 = require("./getMany/execution");
|
|
8
|
+
// import { operationCreate } from "./create/execution";
|
|
9
|
+
const description_1 = require("./get/description");
|
|
10
|
+
const description_2 = require("./update/description");
|
|
11
|
+
const description_3 = require("./getMany/description");
|
|
12
|
+
// import { descriptionCreate, optionsCreate } from "./create/description";
|
|
13
|
+
const options = [
|
|
14
|
+
description_1.optionsGet,
|
|
15
|
+
description_3.optionsGetMany,
|
|
16
|
+
description_2.optionsUpdate,
|
|
17
|
+
// optionsCreate
|
|
18
|
+
];
|
|
19
|
+
const operation = {
|
|
20
|
+
displayName: "Operation",
|
|
21
|
+
name: "operation",
|
|
22
|
+
type: "options",
|
|
23
|
+
noDataExpression: true,
|
|
24
|
+
displayOptions: {
|
|
25
|
+
show: {
|
|
26
|
+
resource: [const_1.RESOURCE_VALUE],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
options,
|
|
30
|
+
default: "get",
|
|
31
|
+
};
|
|
32
|
+
exports.transactionDescription = [
|
|
33
|
+
operation,
|
|
34
|
+
...description_1.descriptionGet,
|
|
35
|
+
...description_3.descriptionGetMany,
|
|
36
|
+
// ...descriptionCreate,
|
|
37
|
+
...description_2.descriptionUpdate,
|
|
38
|
+
];
|
|
39
|
+
exports.transactionOperations = {
|
|
40
|
+
transaction: {
|
|
41
|
+
...execution_1.operationGet,
|
|
42
|
+
...execution_3.operationGetMany,
|
|
43
|
+
//...operationCreate,
|
|
44
|
+
...execution_2.operationUpdate,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
exports.transactionOptions = {
|
|
48
|
+
name: const_1.RESOURCE_DISPLAY_NAME,
|
|
49
|
+
value: const_1.RESOURCE_VALUE,
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/PurchasingAssistant/v1/actions/transaction/index.ts"],"names":[],"mappings":";;;AACA,mCAAgE;AAEhE,+CAA+C;AAC/C,kDAAqD;AACrD,mDAAuD;AACvD,wDAAwD;AAExD,mDAA+D;AAC/D,sDAAwE;AACxE,uDAA2E;AAC3E,2EAA2E;AAE3E,MAAM,OAAO,GAAG;IACZ,wBAAU;IACV,4BAAc;IACd,2BAAa;IACb,gBAAgB;CACnB,CAAC;AAEF,MAAM,SAAS,GAAoB;IAC/B,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE;QACZ,IAAI,EAAE;YACF,QAAQ,EAAE,CAAC,sBAAc,CAAC;SAC7B;KACJ;IACD,OAAO;IACP,OAAO,EAAE,KAAK;CACjB,CAAC;AAEW,QAAA,sBAAsB,GAAG;IAClC,SAAS;IACT,GAAG,4BAAc;IACjB,GAAG,gCAAkB;IACrB,wBAAwB;IACxB,GAAG,+BAAiB;CACvB,CAAC;AAEW,QAAA,qBAAqB,GAAG;IACjC,WAAW,EAAE;QACT,GAAG,wBAAY;QACf,GAAG,4BAAgB;QACnB,qBAAqB;QACrB,GAAG,2BAAe;KACrB;CACJ,CAAC;AAEW,QAAA,kBAAkB,GAAG;IAC9B,IAAI,EAAE,6BAAqB;IAC3B,KAAK,EAAE,sBAAc;CACxB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { INodePropertyOptions } from "n8n-workflow";
|
|
2
|
+
export declare const descriptionUpdate: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow/dist/esm/interfaces").INodePropertyOptions | import("n8n-workflow").INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const optionsUpdate: INodePropertyOptions;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optionsUpdate = exports.descriptionUpdate = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/parameters/utils");
|
|
5
|
+
const parameters_1 = require("../../../parameters");
|
|
6
|
+
const const_1 = require("../const");
|
|
7
|
+
exports.descriptionUpdate = (0, utils_1.getDescription)({
|
|
8
|
+
mainParameters: [
|
|
9
|
+
parameters_1.params.transactionID,
|
|
10
|
+
parameters_1.params.transactionGroupID,
|
|
11
|
+
parameters_1.params.transactionStatusOptional,
|
|
12
|
+
],
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: { resource: [const_1.RESOURCE_VALUE], operation: ["update"] },
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
exports.optionsUpdate = {
|
|
18
|
+
name: "Update",
|
|
19
|
+
value: "update",
|
|
20
|
+
description: "Update a transaction in Purchasing Assistant",
|
|
21
|
+
action: "Update a transaction",
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transaction/update/description.ts"],"names":[],"mappings":";;;AACA,mEAAyE;AACzE,oDAA6C;AAC7C,oCAA0C;AAE7B,QAAA,iBAAiB,GAAG,IAAA,sBAAc,EAAC;IAC5C,cAAc,EAAE;QACZ,mBAAM,CAAC,aAAa;QACpB,mBAAM,CAAC,kBAAkB;QACzB,mBAAM,CAAC,yBAAyB;KACnC;IACD,cAAc,EAAE;QACZ,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,sBAAc,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;KAC9D;CACJ,CAAC,CAAC;AAEU,QAAA,aAAa,GAAyB;IAC/C,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,8CAA8C;IAC3D,MAAM,EAAE,sBAAsB;CACjC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, NodeExecutionWithMetadata } from "n8n-workflow";
|
|
2
|
+
declare function updateExec(this: IExecuteFunctions, index: number): Promise<NodeExecutionWithMetadata[]>;
|
|
3
|
+
export declare const operationUpdate: {
|
|
4
|
+
update: typeof updateExec;
|
|
5
|
+
};
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.operationUpdate = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const utils_1 = require("../../../../../../core/handlers/utils");
|
|
6
|
+
const transport_1 = require("../../../../../../core/transport");
|
|
7
|
+
const utils_2 = require("../utils");
|
|
8
|
+
async function updateExec(index) {
|
|
9
|
+
function getParamUpdateTransaction(index) {
|
|
10
|
+
const transactionID = utils_2.getParamTransactionID.call(this, index);
|
|
11
|
+
const transactionStatus = this.getNodeParameter("transactionStatusOptional", index, null);
|
|
12
|
+
const transactionGroupID = this.getNodeParameter("transactionGroupID", index, null);
|
|
13
|
+
if (!transactionStatus && !transactionGroupID) {
|
|
14
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Please provide a value to update for transaction ${transactionID}`);
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
transactionID,
|
|
18
|
+
transactionStatus: transactionStatus
|
|
19
|
+
? transactionStatus
|
|
20
|
+
: undefined,
|
|
21
|
+
transactionGroupID: transactionGroupID
|
|
22
|
+
? transactionGroupID
|
|
23
|
+
: undefined,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const { transactionID, transactionGroupID, transactionStatus } = getParamUpdateTransaction.call(this, index);
|
|
27
|
+
const result = await (0, transport_1.toolboxApiRequest)(this, {
|
|
28
|
+
method: "PATCH",
|
|
29
|
+
endpoint: `invoicefromfile/${transactionID}`,
|
|
30
|
+
body: { groupID: transactionGroupID, status: transactionStatus },
|
|
31
|
+
});
|
|
32
|
+
return (0, utils_1.constructExecutionMetaData)(this, index, result);
|
|
33
|
+
}
|
|
34
|
+
exports.operationUpdate = { update: updateExec };
|
|
35
|
+
//# sourceMappingURL=execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transaction/update/execution.ts"],"names":[],"mappings":";;;AAAA,+CAIsB;AACtB,iEAAmF;AACnF,gEAAqE;AAErE,oCAAiD;AAEjD,KAAK,UAAU,UAAU,CAErB,KAAa;IAEb,SAAS,yBAAyB,CAA0B,KAAa;QACrE,MAAM,aAAa,GAAG,6BAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAE9D,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAC3C,2BAA2B,EAC3B,KAAK,EACL,IAAI,CACG,CAAC;QAEZ,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,CAC5C,oBAAoB,EACpB,KAAK,EACL,IAAI,CACU,CAAC;QAEnB,IAAI,CAAC,iBAAiB,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC5C,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,oDAAoD,aAAa,EAAE,CACtE,CAAC;QACN,CAAC;QAED,OAAO;YACH,aAAa;YACb,iBAAiB,EAAE,iBAAiB;gBAChC,CAAC,CAAC,iBAAiB;gBACnB,CAAC,CAAC,SAAS;YACf,kBAAkB,EAAE,kBAAkB;gBAClC,CAAC,CAAC,kBAAkB;gBACpB,CAAC,CAAC,SAAS;SAClB,CAAC;IACN,CAAC;IACD,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,GAC1D,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAEhD,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAiB,EAAC,IAAI,EAAE;QACzC,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,mBAAmB,aAAa,EAAE;QAC5C,IAAI,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,iBAAiB,EAAE;KACnE,CAAC,CAAC;IACH,OAAO,IAAA,kCAA0B,EAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3D,CAAC;AAEY,QAAA,eAAe,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IExecuteFunctions } from "n8n-workflow";
|
|
2
|
+
import { TransactionStatusValue } from "../../parameters/options";
|
|
3
|
+
export declare function getParamTransactionID(this: IExecuteFunctions, index: number): string | number | true | object | import("n8n-workflow").INodeParameters | import("n8n-workflow").INodeParameterResourceLocator | import("n8n-workflow").ResourceMapperValue | import("n8n-workflow").FilterValue | import("n8n-workflow").AssignmentCollectionValue | {
|
|
4
|
+
type: "icon";
|
|
5
|
+
value: string;
|
|
6
|
+
} | {
|
|
7
|
+
type: "emoji";
|
|
8
|
+
value: string;
|
|
9
|
+
} | import("n8n-workflow").NodeParameterValue[] | import("n8n-workflow").INodeParameters[] | import("n8n-workflow").INodeParameterResourceLocator[] | import("n8n-workflow").ResourceMapperValue[];
|
|
10
|
+
export declare function getParamStatusMultiOptional(this: IExecuteFunctions, index: number): TransactionStatusValue[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getParamTransactionID = getParamTransactionID;
|
|
4
|
+
exports.getParamStatusMultiOptional = getParamStatusMultiOptional;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const options_1 = require("../../parameters/options");
|
|
7
|
+
function getParamTransactionID(index) {
|
|
8
|
+
const transactionID = this.getNodeParameter("transactionID", index, null);
|
|
9
|
+
if (!transactionID) {
|
|
10
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Please enter a value for Transaction ID");
|
|
11
|
+
}
|
|
12
|
+
return transactionID;
|
|
13
|
+
}
|
|
14
|
+
function getParamStatusMultiOptional(index) {
|
|
15
|
+
const status = this.getNodeParameter("transactionStatusMultiOptional", index, null);
|
|
16
|
+
if (status.length === 0) {
|
|
17
|
+
return options_1.transactionStatusOptions.map(({ value }) => value);
|
|
18
|
+
}
|
|
19
|
+
return status;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../nodes/PurchasingAssistant/v1/actions/transaction/utils.ts"],"names":[],"mappings":";;AAMA,sDASC;AACD,kEAcC;AA9BD,+CAAqE;AACrE,sDAGkC;AAElC,SAAgB,qBAAqB,CAA0B,KAAa;IACxE,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1E,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,yCAAyC,CAC5C,CAAC;IACN,CAAC;IACD,OAAO,aAAa,CAAC;AACzB,CAAC;AACD,SAAgB,2BAA2B,CAEvC,KAAa;IAEb,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAChC,gCAAgC,EAChC,KAAK,EACL,IAAI,CACqB,CAAC;IAE9B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,kCAAwB,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RESOURCE_VALUE = exports.RESOURCE_DISPLAY_NAME = void 0;
|
|
4
|
+
exports.RESOURCE_DISPLAY_NAME = "Transaction Note";
|
|
5
|
+
exports.RESOURCE_VALUE = "transactionNote";
|
|
6
|
+
//# sourceMappingURL=const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../../../nodes/PurchasingAssistant/v1/actions/transactionNote/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAC3C,QAAA,cAAc,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { INodePropertyOptions } from "n8n-workflow";
|
|
2
|
+
export declare const descriptionCreate: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow/dist/esm/interfaces").INodePropertyOptions | import("n8n-workflow").INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const optionsCreate: INodePropertyOptions;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optionsCreate = exports.descriptionCreate = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/parameters/utils");
|
|
5
|
+
const parameters_1 = require("../../../parameters");
|
|
6
|
+
const const_1 = require("../const");
|
|
7
|
+
exports.descriptionCreate = (0, utils_1.getDescription)({
|
|
8
|
+
mainParameters: [
|
|
9
|
+
// TODO: document this standard or replace this standard
|
|
10
|
+
{ ...parameters_1.params.transactionID, required: true },
|
|
11
|
+
parameters_1.params.transactionNoteContent,
|
|
12
|
+
],
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: { resource: [const_1.RESOURCE_VALUE], operation: ["create"] },
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
exports.optionsCreate = {
|
|
18
|
+
name: "Create",
|
|
19
|
+
value: "create",
|
|
20
|
+
description: "Create a transaction note for Purchasing Assistant",
|
|
21
|
+
action: "Create a transaction note",
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transactionNote/create/description.ts"],"names":[],"mappings":";;;AACA,mEAAyE;AACzE,oDAA6C;AAC7C,oCAA0C;AAE7B,QAAA,iBAAiB,GAAG,IAAA,sBAAc,EAAC;IAC5C,cAAc,EAAE;QACZ,wDAAwD;QACxD,EAAE,GAAG,mBAAM,CAAC,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3C,mBAAM,CAAC,sBAAsB;KAChC;IACD,cAAc,EAAE;QACZ,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,sBAAc,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;KAC9D;CACJ,CAAC,CAAC;AAEU,QAAA,aAAa,GAAyB;IAC/C,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,oDAAoD;IACjE,MAAM,EAAE,2BAA2B;CACtC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, NodeExecutionWithMetadata } from "n8n-workflow";
|
|
2
|
+
declare function createExec(this: IExecuteFunctions, index: number): Promise<NodeExecutionWithMetadata[]>;
|
|
3
|
+
export declare const operationCreate: {
|
|
4
|
+
create: typeof createExec;
|
|
5
|
+
};
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.operationCreate = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/handlers/utils");
|
|
5
|
+
const transport_1 = require("../../../../../../core/transport");
|
|
6
|
+
const string_1 = require("../../../../../../core/utils/string");
|
|
7
|
+
const utils_2 = require("../utils");
|
|
8
|
+
async function createExec(index) {
|
|
9
|
+
const id = this.getNodeParameter("transactionID", index);
|
|
10
|
+
(0, string_1.assertValidString)(this, id, "A note must be created on a transaction. Please enter a valid Transaction ID");
|
|
11
|
+
const content = this.getNodeParameter("transactionNoteContent", index);
|
|
12
|
+
(0, string_1.assertValidString)(this, id, "You are not allowed to create an empty note.");
|
|
13
|
+
const result = await (0, transport_1.toolboxApiRequest)(this, {
|
|
14
|
+
method: "POST",
|
|
15
|
+
endpoint: `notes`,
|
|
16
|
+
body: {
|
|
17
|
+
note: content,
|
|
18
|
+
pagePath: (0, utils_2.getPagePathFromTransactionID)(id),
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
return (0, utils_1.constructExecutionMetaData)(this, index, result);
|
|
22
|
+
}
|
|
23
|
+
exports.operationCreate = { create: createExec };
|
|
24
|
+
//# sourceMappingURL=execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transactionNote/create/execution.ts"],"names":[],"mappings":";;;AACA,iEAAmF;AACnF,gEAAqE;AACrE,gEAAwE;AACxE,oCAAwD;AAExD,KAAK,UAAU,UAAU,CAErB,KAAa;IAEb,MAAM,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,KAAK,CAAW,CAAC;IACnE,IAAA,0BAAiB,EACb,IAAI,EACJ,EAAE,EACF,8EAA8E,CACjF,CAAC;IAEF,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CACjC,wBAAwB,EACxB,KAAK,CACE,CAAC;IACZ,IAAA,0BAAiB,EAAC,IAAI,EAAE,EAAE,EAAE,8CAA8C,CAAC,CAAC;IAE5E,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAiB,EAAC,IAAI,EAAE;QACzC,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE;YACF,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,IAAA,oCAA4B,EAAC,EAAE,CAAC;SAC7C;KACJ,CAAC,CAAC;IAEH,OAAO,IAAA,kCAA0B,EAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3D,CAAC;AAEY,QAAA,eAAe,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { INodePropertyOptions } from "n8n-workflow";
|
|
2
|
+
export declare const descriptionGet: {
|
|
3
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
4
|
+
displayName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
7
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
8
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
9
|
+
description?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
builderHint?: import("n8n-workflow").IParameterBuilderHint;
|
|
12
|
+
disabledOptions?: import("n8n-workflow").IDisplayOptions;
|
|
13
|
+
options?: Array<import("n8n-workflow/dist/esm/interfaces").INodePropertyOptions | import("n8n-workflow").INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isNodeSetting?: boolean;
|
|
16
|
+
noDataExpression?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
19
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
22
|
+
requiresDataPath?: "single" | "multiple";
|
|
23
|
+
doNotInherit?: boolean;
|
|
24
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
25
|
+
ignoreValidationDuringExecution?: boolean;
|
|
26
|
+
allowArbitraryValues?: boolean;
|
|
27
|
+
resolvableField?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const optionsGet: INodePropertyOptions;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optionsGet = exports.descriptionGet = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/parameters/utils");
|
|
5
|
+
const parameters_1 = require("../../../parameters");
|
|
6
|
+
const const_1 = require("../const");
|
|
7
|
+
exports.descriptionGet = (0, utils_1.getDescription)({
|
|
8
|
+
mainParameters: [parameters_1.params.transactionNoteID],
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: { resource: [const_1.RESOURCE_VALUE], operation: ["get"] },
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
exports.optionsGet = {
|
|
14
|
+
name: "Get",
|
|
15
|
+
value: "get",
|
|
16
|
+
description: "Retrieve a transaction note from Purchasing Assistant",
|
|
17
|
+
action: "Get a transaction note",
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transactionNote/get/description.ts"],"names":[],"mappings":";;;AACA,mEAAyE;AACzE,oDAA6C;AAC7C,oCAA0C;AAE7B,QAAA,cAAc,GAAG,IAAA,sBAAc,EAAC;IACzC,cAAc,EAAE,CAAC,mBAAM,CAAC,iBAAiB,CAAC;IAC1C,cAAc,EAAE;QACZ,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,sBAAc,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE;KAC3D;CACJ,CAAC,CAAC;AAEU,QAAA,UAAU,GAAyB;IAC5C,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,uDAAuD;IACpE,MAAM,EAAE,wBAAwB;CACnC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.operationGet = void 0;
|
|
4
|
+
const utils_1 = require("../../../../../../core/handlers/utils");
|
|
5
|
+
const transport_1 = require("../../../../../../core/transport");
|
|
6
|
+
function constructGetParams(index) {
|
|
7
|
+
const id = this.getNodeParameter("transactionNoteID", index);
|
|
8
|
+
const qs = {};
|
|
9
|
+
if (id && id !== "")
|
|
10
|
+
qs.id = id;
|
|
11
|
+
return qs;
|
|
12
|
+
}
|
|
13
|
+
async function getExec(index) {
|
|
14
|
+
const qs = constructGetParams.call(this, index);
|
|
15
|
+
const result = await (0, transport_1.toolboxApiRequest)(this, {
|
|
16
|
+
method: "GET",
|
|
17
|
+
endpoint: `notes`,
|
|
18
|
+
qs,
|
|
19
|
+
});
|
|
20
|
+
return (0, utils_1.constructExecutionMetaData)(this, index, result);
|
|
21
|
+
}
|
|
22
|
+
exports.operationGet = { get: getExec };
|
|
23
|
+
//# sourceMappingURL=execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../../../../../nodes/PurchasingAssistant/v1/actions/transactionNote/get/execution.ts"],"names":[],"mappings":";;;AACA,iEAAmF;AACnF,gEAAqE;AAErE,SAAS,kBAAkB,CAA0B,KAAa;IAC9D,MAAM,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,KAAK,CAAW,CAAC;IAEvE,MAAM,EAAE,GAA2B,EAAE,CAAC;IACtC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE;QAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;IAChC,OAAO,EAAE,CAAC;AACd,CAAC;AAED,KAAK,UAAU,OAAO,CAElB,KAAa;IAEb,MAAM,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAEhD,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAiB,EAAC,IAAI,EAAE;QACzC,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,OAAO;QACjB,EAAE;KACL,CAAC,CAAC;IAEH,OAAO,IAAA,kCAA0B,EAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3D,CAAC;AAEY,QAAA,YAAY,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC"}
|