@limetech/n8n-nodes-lime 2.5.3 → 2.5.5-dev.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.
- package/CHANGELOG.md +14 -0
- package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
- package/dist/credentials/FortnoxApi.credentials.js +57 -0
- package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
- package/dist/credentials/LimeCrmApi.credentials.d.ts +9 -0
- package/dist/credentials/LimeCrmApi.credentials.js +70 -0
- package/dist/credentials/LimeCrmApi.credentials.js.map +1 -0
- package/dist/credentials/index.d.ts +2 -0
- package/dist/credentials/index.js +19 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/nodes/errorHandling.d.ts +11 -0
- package/dist/nodes/errorHandling.js +20 -0
- package/dist/nodes/errorHandling.js.map +1 -0
- package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
- package/dist/nodes/fortnox/Fortnox.node.js +95 -0
- package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
- package/dist/nodes/fortnox/Fortnox.node.json +18 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
- package/dist/nodes/fortnox/commons.d.ts +25 -0
- package/dist/nodes/fortnox/commons.js +44 -0
- package/dist/nodes/fortnox/commons.js.map +1 -0
- package/dist/nodes/fortnox/fortnoxLogo.svg +15 -0
- package/dist/nodes/fortnox/index.d.ts +6 -0
- package/dist/nodes/fortnox/index.js +23 -0
- package/dist/nodes/fortnox/index.js.map +1 -0
- package/dist/nodes/fortnox/model.d.ts +20 -0
- package/dist/nodes/fortnox/model.js +3 -0
- package/dist/nodes/fortnox/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/index.d.ts +7 -0
- package/dist/nodes/fortnox/resources/customers/index.js +85 -0
- package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
- package/dist/nodes/fortnox/resources/customers/model.js +3 -0
- package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +281 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +9 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +38 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +38 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +5 -0
- package/dist/nodes/fortnox/resources/customers/operations/index.js +42 -0
- package/dist/nodes/fortnox/resources/customers/operations/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +261 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/index.d.ts +7 -0
- package/dist/nodes/fortnox/resources/invoice/index.js +81 -0
- package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/model.d.ts +147 -0
- package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
- package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +37 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +4 -0
- package/dist/nodes/fortnox/resources/invoice/operations/index.js +41 -0
- package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +64 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
- package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
- package/dist/nodes/fortnox/transport/errorCodes.js +50 -0
- package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
- package/dist/nodes/fortnox/transport/index.d.ts +3 -0
- package/dist/nodes/fortnox/transport/index.js +76 -0
- package/dist/nodes/fortnox/transport/index.js.map +1 -0
- package/dist/nodes/index.d.ts +4 -0
- package/dist/nodes/index.js +21 -0
- package/dist/nodes/index.js.map +1 -0
- package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +19 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +122 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +215 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
- package/dist/nodes/lime-crm/assets/lime-crm.svg +1 -0
- package/dist/nodes/lime-crm/index.d.ts +9 -0
- package/dist/nodes/lime-crm/index.js +26 -0
- package/dist/nodes/lime-crm/index.js.map +1 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +5 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +47 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -0
- package/dist/nodes/lime-crm/methods/getLimetypes.d.ts +2 -0
- package/dist/nodes/lime-crm/methods/getLimetypes.js +20 -0
- package/dist/nodes/lime-crm/methods/getLimetypes.js.map +1 -0
- package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
- package/dist/nodes/lime-crm/methods/index.js +15 -0
- package/dist/nodes/lime-crm/methods/index.js.map +1 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +4 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.js +71 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -0
- package/dist/nodes/lime-crm/models/constants.d.ts +9 -0
- package/dist/nodes/lime-crm/models/constants.js +10 -0
- package/dist/nodes/lime-crm/models/constants.js.map +1 -0
- package/dist/nodes/lime-crm/models/index.d.ts +6 -0
- package/dist/nodes/lime-crm/models/index.js +13 -0
- package/dist/nodes/lime-crm/models/index.js.map +1 -0
- package/dist/nodes/lime-crm/models/limeobject.d.ts +4 -0
- package/dist/nodes/lime-crm/models/limeobject.js +3 -0
- package/dist/nodes/lime-crm/models/limeobject.js.map +1 -0
- package/dist/nodes/lime-crm/models/limetype.d.ts +24 -0
- package/dist/nodes/lime-crm/models/limetype.js +3 -0
- package/dist/nodes/lime-crm/models/limetype.js.map +1 -0
- package/dist/nodes/lime-crm/models/propertyTypes.d.ts +4 -0
- package/dist/nodes/lime-crm/models/propertyTypes.js +5 -0
- package/dist/nodes/lime-crm/models/propertyTypes.js.map +1 -0
- package/dist/nodes/lime-crm/models/users.d.ts +13 -0
- package/dist/nodes/lime-crm/models/users.js +3 -0
- package/dist/nodes/lime-crm/models/users.js.map +1 -0
- package/dist/nodes/lime-crm/models/webhook.d.ts +18 -0
- package/dist/nodes/lime-crm/models/webhook.js +3 -0
- package/dist/nodes/lime-crm/models/webhook.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/admin/index.js +89 -0
- package/dist/nodes/lime-crm/resources/admin/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js +123 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js +87 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.d.ts +2 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.js +39 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/data/index.js +108 -0
- package/dist/nodes/lime-crm/resources/data/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js +124 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.d.ts +10 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js +52 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js +299 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js +125 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js +79 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +6 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.js +43 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js +146 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/metadata/index.js +93 -0
- package/dist/nodes/lime-crm/resources/metadata/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.d.ts +10 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js +16 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js +113 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js +37 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.d.ts +3 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.js +40 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/transport/commons.d.ts +14 -0
- package/dist/nodes/lime-crm/transport/commons.js +52 -0
- package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
- package/dist/nodes/lime-crm/transport/files.d.ts +26 -0
- package/dist/nodes/lime-crm/transport/files.js +96 -0
- package/dist/nodes/lime-crm/transport/files.js.map +1 -0
- package/dist/nodes/lime-crm/transport/index.d.ts +7 -0
- package/dist/nodes/lime-crm/transport/index.js +32 -0
- package/dist/nodes/lime-crm/transport/index.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limeQuery.d.ts +10 -0
- package/dist/nodes/lime-crm/transport/limeQuery.js +18 -0
- package/dist/nodes/lime-crm/transport/limeQuery.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limeobjects.d.ts +16 -0
- package/dist/nodes/lime-crm/transport/limeobjects.js +76 -0
- package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limetypes.d.ts +33 -0
- package/dist/nodes/lime-crm/transport/limetypes.js +85 -0
- package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
- package/dist/nodes/lime-crm/transport/users.d.ts +6 -0
- package/dist/nodes/lime-crm/transport/users.js +159 -0
- package/dist/nodes/lime-crm/transport/users.js.map +1 -0
- package/dist/nodes/lime-crm/transport/webhooks.d.ts +14 -0
- package/dist/nodes/lime-crm/transport/webhooks.js +51 -0
- package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
- package/dist/nodes/lime-crm/utils/files.d.ts +8 -0
- package/dist/nodes/lime-crm/utils/files.js +103 -0
- package/dist/nodes/lime-crm/utils/files.js.map +1 -0
- package/dist/nodes/lime-crm/utils/hmac.d.ts +1 -0
- package/dist/nodes/lime-crm/utils/hmac.js +11 -0
- package/dist/nodes/lime-crm/utils/hmac.js.map +1 -0
- package/dist/nodes/lime-crm/utils/index.d.ts +4 -0
- package/dist/nodes/lime-crm/utils/index.js +16 -0
- package/dist/nodes/lime-crm/utils/index.js.map +1 -0
- package/dist/nodes/lime-crm/utils/webhook.d.ts +2 -0
- package/dist/nodes/lime-crm/utils/webhook.js +34 -0
- package/dist/nodes/lime-crm/utils/webhook.js.map +1 -0
- package/dist/nodes/modules.d.ts +12 -0
- package/dist/nodes/modules.js +16 -0
- package/dist/nodes/modules.js.map +1 -0
- package/dist/nodes/response.d.ts +18 -0
- package/dist/nodes/response.js +3 -0
- package/dist/nodes/response.js.map +1 -0
- package/dist/package.json +69 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -2
- package/.github/workflows/lint.yml +0 -23
- package/.github/workflows/mark-stale.yml +0 -21
- package/.github/workflows/release.yml +0 -35
- package/.github/workflows/test-and-build.yml +0 -32
- package/.prettierrc.mjs +0 -1
- package/.releaserc.json +0 -35
- package/Dockerfile +0 -0
- package/eslint.config.mjs +0 -28
- package/jest.config.js +0 -11
- package/knip.json +0 -9
- package/tests/nodes/lime-crm/methods.spec.ts +0 -91
- package/tests/nodes/lime-crm/utils.spec.ts +0 -273
- package/tsconfig.json +0 -30
- package/typedoc.css +0 -9
- package/typedoc.json +0 -19
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getSingleFileMetadata = exports.getAllLimetypes = exports.getSingleLimetype = void 0;
|
|
37
|
+
exports.getSingleLimetype = __importStar(require("./getSingleLimetype.operation"));
|
|
38
|
+
exports.getAllLimetypes = __importStar(require("./getAllLimetypes.operation"));
|
|
39
|
+
exports.getSingleFileMetadata = __importStar(require("./getSingleFileMetadata.operation"));
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/lime-crm/resources/metadata/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,mFAAmE;AAInE,+EAA+D;AAI/D,2FAA2E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { APIResponse, SuccessResponse } from '../../response';
|
|
3
|
+
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
4
|
+
export declare function removeKeys<T extends object, K extends keyof T>(data: T, keys: K[]): Omit<T, K>;
|
|
5
|
+
export declare function prepareResponseWithoutKeys<T extends object, K extends keyof T>(response: SuccessResponse<T>, keys: K[]): SuccessResponse<Omit<T, K>>;
|
|
6
|
+
interface LimeAPIArguments {
|
|
7
|
+
method: HTTPMethod;
|
|
8
|
+
url: string;
|
|
9
|
+
requestOptions?: Record<string, unknown>;
|
|
10
|
+
json?: boolean;
|
|
11
|
+
errorMetadata?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export declare function callLimeApi<T>(nodeContext: IAllExecuteFunctions, options: LimeAPIArguments): Promise<APIResponse<T>>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeKeys = removeKeys;
|
|
4
|
+
exports.prepareResponseWithoutKeys = prepareResponseWithoutKeys;
|
|
5
|
+
exports.callLimeApi = callLimeApi;
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
function removeKeys(data, keys) {
|
|
9
|
+
const { ...obj } = data;
|
|
10
|
+
for (const key of keys) {
|
|
11
|
+
delete obj[key];
|
|
12
|
+
}
|
|
13
|
+
return obj;
|
|
14
|
+
}
|
|
15
|
+
function prepareResponseWithoutKeys(response, keys) {
|
|
16
|
+
return {
|
|
17
|
+
success: true,
|
|
18
|
+
data: removeKeys(response.data, keys),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
async function getLimeUrl(context) {
|
|
22
|
+
const credentials = await context.getCredentials(models_1.LIME_CRM_API_CREDENTIAL_KEY);
|
|
23
|
+
return credentials.url;
|
|
24
|
+
}
|
|
25
|
+
async function callLimeApi(nodeContext, options) {
|
|
26
|
+
var _a;
|
|
27
|
+
try {
|
|
28
|
+
const response = await nodeContext.helpers.requestWithAuthentication.call(nodeContext, models_1.LIME_CRM_API_CREDENTIAL_KEY, {
|
|
29
|
+
method: options.method,
|
|
30
|
+
url: options.url,
|
|
31
|
+
json: options.json || true,
|
|
32
|
+
baseURL: await getLimeUrl(nodeContext),
|
|
33
|
+
...options.requestOptions,
|
|
34
|
+
});
|
|
35
|
+
return {
|
|
36
|
+
success: true,
|
|
37
|
+
data: response,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
const errorContext = {
|
|
42
|
+
message: error instanceof Error ? error.message : String(error),
|
|
43
|
+
status: (_a = error === null || error === void 0 ? void 0 : error.cause) === null || _a === void 0 ? void 0 : _a.status,
|
|
44
|
+
metadata: {
|
|
45
|
+
...options.requestOptions,
|
|
46
|
+
...options.errorMetadata,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
return (0, utils_1.handleWorkflowError)(nodeContext, errorContext, true);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=commons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commons.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/commons.ts"],"names":[],"mappings":";;AAwBA,gCASC;AAED,gEAQC;AAqDD,kCAgCC;AAhID,sCAAwD;AAExD,oCAAqE;AAsBrE,SAAgB,UAAU,CACtB,IAAO,EACP,IAAS;IAET,MAAM,EAAE,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC;IACxB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,SAAgB,0BAA0B,CACtC,QAA4B,EAC5B,IAAS;IAET,OAAO;QACH,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;KACxC,CAAC;AACN,CAAC;AAYD,KAAK,UAAU,UAAU,CAAC,OAA6B;IACnD,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,cAAc,CAC5C,oCAA2B,CAC9B,CAAC;IACF,OAAO,WAAW,CAAC,GAAa,CAAC;AACrC,CAAC;AAoCM,KAAK,UAAU,WAAW,CAC7B,WAAiC,EACjC,OAAyB;;IAEzB,IAAI,CAAC;QACD,MAAM,QAAQ,GACV,MAAM,WAAW,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CACpD,WAAW,EACX,oCAA2B,EAC3B;YACI,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI;YAC1B,OAAO,EAAE,MAAM,UAAU,CAAC,WAAW,CAAC;YACtC,GAAG,OAAO,CAAC,cAAc;SAC5B,CACJ,CAAC;QACN,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,QAAQ;SACjB,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,YAAY,GAAyB;YACvC,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAC/D,MAAM,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,MAAM;YAC5B,QAAQ,EAAE;gBACN,GAAG,OAAO,CAAC,cAAc;gBACzB,GAAG,OAAO,CAAC,aAAa;aACb;SAClB,CAAC;QACF,OAAO,IAAA,2BAAmB,EAAC,WAAW,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IExecuteFunctions, IBinaryData } from 'n8n-workflow';
|
|
2
|
+
import { APIResponse } from '../../response';
|
|
3
|
+
export interface FileApiResponse {
|
|
4
|
+
headers: Record<string, string | string[] | undefined>;
|
|
5
|
+
body: Buffer;
|
|
6
|
+
}
|
|
7
|
+
export type FileMetadata = {
|
|
8
|
+
filename: string;
|
|
9
|
+
id: number;
|
|
10
|
+
size: number;
|
|
11
|
+
content_type: string;
|
|
12
|
+
extension: string;
|
|
13
|
+
created_by: number;
|
|
14
|
+
locked_by: number;
|
|
15
|
+
last_modified: string;
|
|
16
|
+
_links?: {
|
|
17
|
+
[key: string]: {
|
|
18
|
+
href: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare function getFileMetadata(nodeContext: IExecuteFunctions, id: string | number): Promise<APIResponse<FileMetadata>>;
|
|
23
|
+
export declare function getFileMetadataByLimeobject(nodeContext: IExecuteFunctions, limetype: string, id: string, fileTypeProperty: string): Promise<APIResponse<FileMetadata>>;
|
|
24
|
+
export declare function getFileContent(nodeContext: IExecuteFunctions, id: string | number): Promise<APIResponse<IBinaryData>>;
|
|
25
|
+
export declare function getFileContentByLimetype(nodeContext: IExecuteFunctions, limetype: string, id: string, fileTypeProperty: string): Promise<APIResponse<IBinaryData>>;
|
|
26
|
+
export declare function createFile(nodeContext: IExecuteFunctions, binary: IBinaryData, fallbackFileName: string): Promise<APIResponse<FileMetadata>>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFileMetadata = getFileMetadata;
|
|
4
|
+
exports.getFileMetadataByLimeobject = getFileMetadataByLimeobject;
|
|
5
|
+
exports.getFileContent = getFileContent;
|
|
6
|
+
exports.getFileContentByLimetype = getFileContentByLimetype;
|
|
7
|
+
exports.createFile = createFile;
|
|
8
|
+
const _1 = require(".");
|
|
9
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
10
|
+
const commons_1 = require("./commons");
|
|
11
|
+
const utils_1 = require("../utils");
|
|
12
|
+
const LIME_FILE_URL = '/api/v1/file/';
|
|
13
|
+
async function getFileMetadata(nodeContext, id) {
|
|
14
|
+
const url = `${LIME_FILE_URL}${id}/`;
|
|
15
|
+
const fileMetadataResponse = await (0, _1.callLimeApi)(nodeContext, {
|
|
16
|
+
method: 'GET',
|
|
17
|
+
url: url,
|
|
18
|
+
});
|
|
19
|
+
if (!fileMetadataResponse.success)
|
|
20
|
+
return fileMetadataResponse;
|
|
21
|
+
return (0, commons_1.prepareResponseWithoutKeys)(fileMetadataResponse, ['_links']);
|
|
22
|
+
}
|
|
23
|
+
async function getFileMetadataByLimeobject(nodeContext, limetype, id, fileTypeProperty) {
|
|
24
|
+
const objectResponse = await (0, _1.getLimeobject)(nodeContext, limetype, id);
|
|
25
|
+
if (!objectResponse.success)
|
|
26
|
+
return objectResponse;
|
|
27
|
+
const fileId = objectResponse.data[fileTypeProperty];
|
|
28
|
+
if (!fileId) {
|
|
29
|
+
return (0, utils_1.handleWorkflowError)(nodeContext, {
|
|
30
|
+
message: 'The specified Limeobject does not have an associated file',
|
|
31
|
+
}, true);
|
|
32
|
+
}
|
|
33
|
+
const fileMetadataResponse = await getFileMetadata(nodeContext, fileId);
|
|
34
|
+
if (!fileMetadataResponse.success)
|
|
35
|
+
return fileMetadataResponse;
|
|
36
|
+
return (0, commons_1.prepareResponseWithoutKeys)(fileMetadataResponse, ['_links']);
|
|
37
|
+
}
|
|
38
|
+
async function getFileContent(nodeContext, id) {
|
|
39
|
+
const url = `${LIME_FILE_URL}${id}/contents/`;
|
|
40
|
+
const response = await (0, _1.callLimeApi)(nodeContext, {
|
|
41
|
+
method: 'GET',
|
|
42
|
+
url: url,
|
|
43
|
+
requestOptions: {
|
|
44
|
+
encoding: null,
|
|
45
|
+
responseType: 'stream',
|
|
46
|
+
resolveWithFullResponse: true,
|
|
47
|
+
},
|
|
48
|
+
json: false,
|
|
49
|
+
});
|
|
50
|
+
if (!response.success)
|
|
51
|
+
return response;
|
|
52
|
+
const fileName = (0, utils_1.getFilenameFromHeader)(response.data.headers) || `file_${id}`;
|
|
53
|
+
const binaryData = await nodeContext.helpers.prepareBinaryData(response.data.body);
|
|
54
|
+
binaryData.fileName = (0, utils_1.setFilename)(binaryData, fileName);
|
|
55
|
+
return {
|
|
56
|
+
success: true,
|
|
57
|
+
data: binaryData,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
async function getFileContentByLimetype(nodeContext, limetype, id, fileTypeProperty) {
|
|
61
|
+
const limeObjectResponse = await (0, _1.getLimeobject)(nodeContext, limetype, id);
|
|
62
|
+
if (!limeObjectResponse.success)
|
|
63
|
+
return limeObjectResponse;
|
|
64
|
+
const fileId = limeObjectResponse.data[fileTypeProperty];
|
|
65
|
+
if (!fileId) {
|
|
66
|
+
return (0, utils_1.handleWorkflowError)(nodeContext, {
|
|
67
|
+
message: 'The specified Limeobject does not have an associated file.',
|
|
68
|
+
}, true);
|
|
69
|
+
}
|
|
70
|
+
return await getFileContent(nodeContext, fileId);
|
|
71
|
+
}
|
|
72
|
+
async function createFile(nodeContext, binary, fallbackFileName) {
|
|
73
|
+
const response = await (0, _1.callLimeApi)(nodeContext, {
|
|
74
|
+
method: 'POST',
|
|
75
|
+
url: LIME_FILE_URL,
|
|
76
|
+
requestOptions: {
|
|
77
|
+
body: Buffer.from(binary.data, n8n_workflow_1.BINARY_ENCODING),
|
|
78
|
+
headers: {
|
|
79
|
+
'Content-Disposition': `;filename*="UTF-8''${encodeURIComponent(binary.fileName || fallbackFileName)}"`,
|
|
80
|
+
'Content-Type': binary.mimeType,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
if (!response.success)
|
|
85
|
+
return {
|
|
86
|
+
success: false,
|
|
87
|
+
data: {
|
|
88
|
+
error: {
|
|
89
|
+
message: response.data.error.message,
|
|
90
|
+
status: response.data.error.status,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
return (0, commons_1.prepareResponseWithoutKeys)(response, ['_links']);
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/files.ts"],"names":[],"mappings":";;AAqEA,0CAaC;AAcD,kEA0BC;AAYD,wCA8BC;AAcD,4DAyBC;AAaD,gCA4BC;AApPD,wBAA+C;AAC/C,+CAA+E;AAC/E,uCAAuD;AACvD,oCAIkB;AAQlB,MAAM,aAAa,GAAG,eAAe,CAAC;AAsD/B,KAAK,UAAU,eAAe,CACjC,WAA8B,EAC9B,EAAmB;IAEnB,MAAM,GAAG,GAAG,GAAG,aAAa,GAAG,EAAE,GAAG,CAAC;IACrC,MAAM,oBAAoB,GAAG,MAAM,IAAA,cAAW,EAAe,WAAW,EAAE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IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,8BAAe,CAAC;YAC/C,OAAO,EAAE;gBACL,qBAAqB,EAAE,sBAAsB,kBAAkB,CAAC,MAAM,CAAC,QAAQ,IAAI,gBAAgB,CAAC,GAAG;gBACvG,cAAc,EAAE,MAAM,CAAC,QAAQ;aAClC;SACJ;KACJ,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,OAAO;QACjB,OAAO;YACH,OAAO,EAAE,KAAK;YACd,IAAI,EAAE;gBACF,KAAK,EAAE;oBACH,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;oBACpC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;iBACrC;aACJ;SACJ,CAAC;IAEN,OAAO,IAAA,oCAA0B,EAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { HTTPMethod, callLimeApi, removeKeys } from './commons';
|
|
2
|
+
export { FileApiResponse, FileMetadata, createFile, getFileContent, getFileContentByLimetype, getFileMetadata, getFileMetadataByLimeobject, } from './files';
|
|
3
|
+
export { FetchManyLimeobjectsApiResponse, LimeobjectCrmApiResponse, createLimeobject, deleteLimeobject, updateLimeobject, getLimeobject, } from './limeobjects';
|
|
4
|
+
export { IncludedProperties, QueryResponse, queryLimeobjects, } from './limeQuery';
|
|
5
|
+
export { LimetypeCrmApiResponse, LimetypePropertiesApiResponse, LimetypePropertyApiResponse, LimetypesCrmApiResponse, getLimetypesFromApi, getProperties, } from './limetypes';
|
|
6
|
+
export { ApiResponseWebhook, createSubscription, deleteSubscription, getSubscription, listSubscriptionsWithExistingData, } from './webhooks';
|
|
7
|
+
export { fetchManyUsers, fetchSingleUserById, fetchSingleUserByLimeobjectId, } from './users';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchSingleUserByLimeobjectId = exports.fetchSingleUserById = exports.fetchManyUsers = exports.listSubscriptionsWithExistingData = exports.getSubscription = exports.deleteSubscription = exports.createSubscription = exports.getProperties = exports.getLimetypesFromApi = exports.queryLimeobjects = exports.getLimeobject = exports.updateLimeobject = exports.deleteLimeobject = exports.createLimeobject = exports.getFileMetadataByLimeobject = exports.getFileMetadata = exports.getFileContentByLimetype = exports.getFileContent = exports.createFile = exports.removeKeys = exports.callLimeApi = void 0;
|
|
4
|
+
var commons_1 = require("./commons");
|
|
5
|
+
Object.defineProperty(exports, "callLimeApi", { enumerable: true, get: function () { return commons_1.callLimeApi; } });
|
|
6
|
+
Object.defineProperty(exports, "removeKeys", { enumerable: true, get: function () { return commons_1.removeKeys; } });
|
|
7
|
+
var files_1 = require("./files");
|
|
8
|
+
Object.defineProperty(exports, "createFile", { enumerable: true, get: function () { return files_1.createFile; } });
|
|
9
|
+
Object.defineProperty(exports, "getFileContent", { enumerable: true, get: function () { return files_1.getFileContent; } });
|
|
10
|
+
Object.defineProperty(exports, "getFileContentByLimetype", { enumerable: true, get: function () { return files_1.getFileContentByLimetype; } });
|
|
11
|
+
Object.defineProperty(exports, "getFileMetadata", { enumerable: true, get: function () { return files_1.getFileMetadata; } });
|
|
12
|
+
Object.defineProperty(exports, "getFileMetadataByLimeobject", { enumerable: true, get: function () { return files_1.getFileMetadataByLimeobject; } });
|
|
13
|
+
var limeobjects_1 = require("./limeobjects");
|
|
14
|
+
Object.defineProperty(exports, "createLimeobject", { enumerable: true, get: function () { return limeobjects_1.createLimeobject; } });
|
|
15
|
+
Object.defineProperty(exports, "deleteLimeobject", { enumerable: true, get: function () { return limeobjects_1.deleteLimeobject; } });
|
|
16
|
+
Object.defineProperty(exports, "updateLimeobject", { enumerable: true, get: function () { return limeobjects_1.updateLimeobject; } });
|
|
17
|
+
Object.defineProperty(exports, "getLimeobject", { enumerable: true, get: function () { return limeobjects_1.getLimeobject; } });
|
|
18
|
+
var limeQuery_1 = require("./limeQuery");
|
|
19
|
+
Object.defineProperty(exports, "queryLimeobjects", { enumerable: true, get: function () { return limeQuery_1.queryLimeobjects; } });
|
|
20
|
+
var limetypes_1 = require("./limetypes");
|
|
21
|
+
Object.defineProperty(exports, "getLimetypesFromApi", { enumerable: true, get: function () { return limetypes_1.getLimetypesFromApi; } });
|
|
22
|
+
Object.defineProperty(exports, "getProperties", { enumerable: true, get: function () { return limetypes_1.getProperties; } });
|
|
23
|
+
var webhooks_1 = require("./webhooks");
|
|
24
|
+
Object.defineProperty(exports, "createSubscription", { enumerable: true, get: function () { return webhooks_1.createSubscription; } });
|
|
25
|
+
Object.defineProperty(exports, "deleteSubscription", { enumerable: true, get: function () { return webhooks_1.deleteSubscription; } });
|
|
26
|
+
Object.defineProperty(exports, "getSubscription", { enumerable: true, get: function () { return webhooks_1.getSubscription; } });
|
|
27
|
+
Object.defineProperty(exports, "listSubscriptionsWithExistingData", { enumerable: true, get: function () { return webhooks_1.listSubscriptionsWithExistingData; } });
|
|
28
|
+
var users_1 = require("./users");
|
|
29
|
+
Object.defineProperty(exports, "fetchManyUsers", { enumerable: true, get: function () { return users_1.fetchManyUsers; } });
|
|
30
|
+
Object.defineProperty(exports, "fetchSingleUserById", { enumerable: true, get: function () { return users_1.fetchSingleUserById; } });
|
|
31
|
+
Object.defineProperty(exports, "fetchSingleUserByLimeobjectId", { enumerable: true, get: function () { return users_1.fetchSingleUserByLimeobjectId; } });
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgE;AAA3C,sGAAA,WAAW,OAAA;AAAE,qGAAA,UAAU,OAAA;AAC5C,iCAQiB;AALb,mGAAA,UAAU,OAAA;AACV,uGAAA,cAAc,OAAA;AACd,iHAAA,wBAAwB,OAAA;AACxB,wGAAA,eAAe,OAAA;AACf,oHAAA,2BAA2B,OAAA;AAE/B,6CAOuB;AAJnB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,+GAAA,gBAAgB,OAAA;AAChB,4GAAA,aAAa,OAAA;AAEjB,yCAIqB;AADjB,6GAAA,gBAAgB,OAAA;AAEpB,yCAOqB;AAFjB,gHAAA,mBAAmB,OAAA;AACnB,0GAAA,aAAa,OAAA;AAEjB,uCAMoB;AAJhB,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,2GAAA,eAAe,OAAA;AACf,6HAAA,iCAAiC,OAAA;AAErC,iCAIiB;AAHb,uGAAA,cAAc,OAAA;AACd,4GAAA,mBAAmB,OAAA;AACnB,sHAAA,6BAA6B,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { APIResponsePrimitiveValue } from '../models';
|
|
3
|
+
import { APIResponse } from '../../response';
|
|
4
|
+
export interface IncludedProperties {
|
|
5
|
+
[key: string]: IncludedProperties | APIResponsePrimitiveValue;
|
|
6
|
+
}
|
|
7
|
+
export interface QueryResponse {
|
|
8
|
+
objects: IncludedProperties[];
|
|
9
|
+
}
|
|
10
|
+
export declare function queryLimeobjects(nodeContext: IAllExecuteFunctions, q: string): Promise<APIResponse<QueryResponse>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queryLimeobjects = queryLimeobjects;
|
|
4
|
+
const commons_1 = require("./commons");
|
|
5
|
+
const LIME_QUERY_URL = '/api/v1/query/';
|
|
6
|
+
async function queryLimeobjects(nodeContext, q) {
|
|
7
|
+
const queryParameters = {
|
|
8
|
+
q: q,
|
|
9
|
+
};
|
|
10
|
+
return await (0, commons_1.callLimeApi)(nodeContext, {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: LIME_QUERY_URL,
|
|
13
|
+
requestOptions: {
|
|
14
|
+
qs: queryParameters,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=limeQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limeQuery.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limeQuery.ts"],"names":[],"mappings":";;AA8CA,4CAeC;AA5DD,uCAAwC;AASxC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAoCjC,KAAK,UAAU,gBAAgB,CAClC,WAAiC,EACjC,CAAS;IAET,MAAM,eAAe,GAAG;QACpB,CAAC,EAAE,CAAC;KACP,CAAC;IAEF,OAAO,MAAM,IAAA,qBAAW,EAAC,WAAW,EAAE;QAClC,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,cAAc;QACnB,cAAc,EAAE;YACZ,EAAE,EAAE,eAAe;SACtB;KACJ,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { Limeobject } from '../models';
|
|
3
|
+
import { APIResponse } from '../../response';
|
|
4
|
+
export interface LimeobjectCrmApiResponse {
|
|
5
|
+
id_: number;
|
|
6
|
+
_links: object;
|
|
7
|
+
}
|
|
8
|
+
export interface FetchManyLimeobjectsApiResponse {
|
|
9
|
+
_embedded: {
|
|
10
|
+
limeobjects: LimeobjectCrmApiResponse[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function createLimeobject(nodeContext: IAllExecuteFunctions, limetype: string, data: object): Promise<APIResponse<Limeobject>>;
|
|
14
|
+
export declare function deleteLimeobject(nodeContext: IAllExecuteFunctions, limetype: string, id: string): Promise<APIResponse<Record<string, never>>>;
|
|
15
|
+
export declare function getLimeobject(nodeContext: IAllExecuteFunctions, limetype: string, id: string): Promise<APIResponse<Limeobject>>;
|
|
16
|
+
export declare function updateLimeobject(nodeContext: IAllExecuteFunctions, limetype: string, id: string, data: object): Promise<APIResponse<Limeobject>>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLimeobject = createLimeobject;
|
|
4
|
+
exports.deleteLimeobject = deleteLimeobject;
|
|
5
|
+
exports.getLimeobject = getLimeobject;
|
|
6
|
+
exports.updateLimeobject = updateLimeobject;
|
|
7
|
+
const commons_1 = require("./commons");
|
|
8
|
+
const LIMEOBJECT_URL = '/api/v1/limeobject/';
|
|
9
|
+
async function createLimeobject(nodeContext, limetype, data) {
|
|
10
|
+
const url = `${LIMEOBJECT_URL}${limetype}/`;
|
|
11
|
+
const response = await (0, commons_1.callLimeApi)(nodeContext, {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
url: url,
|
|
14
|
+
requestOptions: {
|
|
15
|
+
body: data,
|
|
16
|
+
},
|
|
17
|
+
errorMetadata: {
|
|
18
|
+
limetype: limetype,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
if (response.success) {
|
|
22
|
+
return (0, commons_1.prepareResponseWithoutKeys)(response, ['_links']);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return response;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function deleteLimeobject(nodeContext, limetype, id) {
|
|
29
|
+
const url = `${LIMEOBJECT_URL}${limetype}/${id}/`;
|
|
30
|
+
return await (0, commons_1.callLimeApi)(nodeContext, {
|
|
31
|
+
method: 'DELETE',
|
|
32
|
+
url: url,
|
|
33
|
+
errorMetadata: {
|
|
34
|
+
limetype: limetype,
|
|
35
|
+
id: id,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
async function getLimeobject(nodeContext, limetype, id) {
|
|
40
|
+
const url = `${LIMEOBJECT_URL}${limetype}/${id}/`;
|
|
41
|
+
const response = await (0, commons_1.callLimeApi)(nodeContext, {
|
|
42
|
+
method: 'GET',
|
|
43
|
+
url: url,
|
|
44
|
+
errorMetadata: {
|
|
45
|
+
limetype: limetype,
|
|
46
|
+
id: id,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
if (response.success) {
|
|
50
|
+
return (0, commons_1.prepareResponseWithoutKeys)(response, ['_links']);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return response;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async function updateLimeobject(nodeContext, limetype, id, data) {
|
|
57
|
+
const url = `${LIMEOBJECT_URL}${limetype}/${id}/`;
|
|
58
|
+
const response = await (0, commons_1.callLimeApi)(nodeContext, {
|
|
59
|
+
method: 'PUT',
|
|
60
|
+
url: url,
|
|
61
|
+
requestOptions: {
|
|
62
|
+
body: data,
|
|
63
|
+
},
|
|
64
|
+
errorMetadata: {
|
|
65
|
+
limetype: limetype,
|
|
66
|
+
id: id,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
if (response.success) {
|
|
70
|
+
return (0, commons_1.prepareResponseWithoutKeys)(response, ['_links']);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
return response;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=limeobjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limeobjects.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limeobjects.ts"],"names":[],"mappings":";;AAiDA,4CAqBC;AAaD,4CAcC;AAaD,sCAmBC;AAcD,4CAuBC;AAtKD,uCAAoE;AAUpE,MAAM,cAAc,GAAG,qBAAqB,CAAC;AAuCtC,KAAK,UAAU,gBAAgB,CAClC,WAAiC,EACjC,QAAgB,EAChB,IAAY;IAEZ,MAAM,GAAG,GAAG,GAAG,cAAc,GAAG,QAAQ,GAAG,CAAC;IAC5C,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAW,EAA2B,WAAW,EAAE;QACt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,gBAAgB,CAClC,WAAiC,EACjC,QAAgB,EAChB,EAAU,EACV,IAAY;IAEZ,MAAM,GAAG,GAAG,GAAG,cAAc,GAAG,QAAQ,IAAI,EAAE,GAAG,CAAC;IAClD,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAW,EAA2B,WAAW,EAAE;QACtE,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,GAAG;QACR,cAAc,EAAE;YACZ,IAAI,EAAE,IAAI;SACb;QACD,aAAa,EAAE;YACX,QAAQ,EAAE,QAAQ;YAClB,EAAE,EAAE,EAAE;SACT;KACJ,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,IAAA,oCAA0B,EAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,CAAC;SAAM,CAAC;QACJ,OAAO,QAAQ,CAAC;IACpB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { Limetype, LimetypeProperty } from '../models';
|
|
3
|
+
import { APIResponse } from '../../response';
|
|
4
|
+
export interface LimetypePropertyApiResponse {
|
|
5
|
+
name: string;
|
|
6
|
+
_links?: object;
|
|
7
|
+
_embedded?: object;
|
|
8
|
+
}
|
|
9
|
+
export interface LimetypeCrmApiResponse {
|
|
10
|
+
name: string;
|
|
11
|
+
localname?: {
|
|
12
|
+
singular?: string;
|
|
13
|
+
plural?: string;
|
|
14
|
+
};
|
|
15
|
+
_embedded: {
|
|
16
|
+
properties: LimetypePropertyApiResponse[];
|
|
17
|
+
};
|
|
18
|
+
_links: object;
|
|
19
|
+
}
|
|
20
|
+
export interface LimetypesCrmApiResponse {
|
|
21
|
+
_embedded: {
|
|
22
|
+
limetypes: LimetypeCrmApiResponse[];
|
|
23
|
+
_links: object;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface LimetypePropertiesApiResponse {
|
|
27
|
+
_embedded: {
|
|
28
|
+
properties: LimetypeCrmApiResponse[];
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export declare function getLimetypesFromApi(nodeContext: IAllExecuteFunctions): Promise<APIResponse<Limetype[]>>;
|
|
32
|
+
export declare function getLimetype(nodeContext: IAllExecuteFunctions, limetype: string): Promise<APIResponse<Limetype>>;
|
|
33
|
+
export declare function getProperties(nodeContext: IAllExecuteFunctions, limetype: string): Promise<APIResponse<LimetypeProperty[]>>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLimetypesFromApi = getLimetypesFromApi;
|
|
4
|
+
exports.getLimetype = getLimetype;
|
|
5
|
+
exports.getProperties = getProperties;
|
|
6
|
+
const _1 = require(".");
|
|
7
|
+
const commons_1 = require("./commons");
|
|
8
|
+
const LIMETYPE_URL = '/api/v1/limetype/';
|
|
9
|
+
function deserializeLimetype(limetype) {
|
|
10
|
+
return {
|
|
11
|
+
...(0, commons_1.removeKeys)(limetype, ['_links', '_embedded']),
|
|
12
|
+
properties: limetype._embedded.properties.map((property) => (0, commons_1.removeKeys)(property, ['_links'])),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
async function getLimetypesFromApi(nodeContext) {
|
|
16
|
+
var _a;
|
|
17
|
+
const response = await (0, _1.callLimeApi)(nodeContext, {
|
|
18
|
+
method: 'GET',
|
|
19
|
+
url: LIMETYPE_URL,
|
|
20
|
+
requestOptions: {
|
|
21
|
+
qs: {
|
|
22
|
+
_embed: 'limetypes.properties',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
if (response.success) {
|
|
27
|
+
return {
|
|
28
|
+
success: true,
|
|
29
|
+
data: ((_a = response.data._embedded) === null || _a === void 0 ? void 0 : _a.limetypes.map(deserializeLimetype)) ||
|
|
30
|
+
[],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return response;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function getLimetype(nodeContext, limetype) {
|
|
38
|
+
const url = `${LIMETYPE_URL}${limetype}/`;
|
|
39
|
+
const response = await (0, _1.callLimeApi)(nodeContext, {
|
|
40
|
+
method: 'GET',
|
|
41
|
+
url: url,
|
|
42
|
+
requestOptions: {
|
|
43
|
+
qs: {
|
|
44
|
+
_embed: 'properties',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
if (response.success) {
|
|
49
|
+
return {
|
|
50
|
+
success: true,
|
|
51
|
+
data: deserializeLimetype(response.data),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return response;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function getProperties(nodeContext, limetype) {
|
|
59
|
+
const url = `${LIMETYPE_URL}${limetype}/`;
|
|
60
|
+
const response = await (0, _1.callLimeApi)(nodeContext, {
|
|
61
|
+
method: 'GET',
|
|
62
|
+
url: url,
|
|
63
|
+
requestOptions: {
|
|
64
|
+
qs: {
|
|
65
|
+
_embed: 'properties',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
errorMetadata: {
|
|
69
|
+
limetype: limetype,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
if (response.success) {
|
|
73
|
+
return {
|
|
74
|
+
success: true,
|
|
75
|
+
data: response.data._embedded.properties.map((property) => (0, commons_1.removeKeys)(property, [
|
|
76
|
+
'_links',
|
|
77
|
+
'_embedded',
|
|
78
|
+
])) || [],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return response;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=limetypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limetypes.js","sourceRoot":"","sources":["../../../../nodes/lime-crm/transport/limetypes.ts"],"names":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M,EAAE,YAAY;aACvB;SACJ;KACJ,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC;SAC3C,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,OAAO,QAAQ,CAAC;IACpB,CAAC;AACL,CAAC;AAYM,KAAK,UAAU,aAAa,CAC/B,WAAiC,EACjC,QAAgB;IAEhB,MAAM,GAAG,GAAG,GAAG,YAAY,GAAG,QAAQ,GAAG,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,IAAA,cAAW,EAC9B,WAAW,EACX;QACI,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,GAAG;QACR,cAAc,EAAE;YACZ,EAAE,EAAE;gBACA,MAAM,EAAE,YAAY;aACvB;SACJ;QACD,aAAa,EAAE;YACX,QAAQ,EAAE,QAAQ;SACrB;KACJ,CACJ,CAAC;IACF,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO;YACH,OAAO,EAAE,IAAI;YACb,IAAI,EACA,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAClC,CAAC,QAAQ,EAAE,EAAE,CACT,IAAA,oBAAU,EAAC,QAAQ,EAAE;gBACjB,QAAQ;gBACR,WAAW;aACd,CAAqB,CAC7B,IAAI,EAAE;SACd,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,OAAO,QAAQ,CAAC;IACpB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IAllExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { User, UserType, NullOptionType } from '../models';
|
|
3
|
+
import { APIResponse } from '../../response';
|
|
4
|
+
export declare function fetchManyUsers(nodeContext: IAllExecuteFunctions, active?: boolean | NullOptionType, userType?: UserType | NullOptionType, limit?: number, withCoworker?: boolean): Promise<APIResponse<User[]>>;
|
|
5
|
+
export declare function fetchSingleUserById(nodeContext: IAllExecuteFunctions, id: string, withCoworker?: boolean): Promise<APIResponse<User>>;
|
|
6
|
+
export declare function fetchSingleUserByLimeobjectId(nodeContext: IAllExecuteFunctions, id: string, withCoworker?: boolean): Promise<APIResponse<User>>;
|