@limetech/n8n-nodes-lime 0.3.2 → 0.3.3
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/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/credentials/LimeGoApi.credentials.d.ts +0 -15
- package/dist/credentials/LimeGoApi.credentials.js +0 -32
- package/dist/credentials/LimeGoApi.credentials.js.map +0 -1
- package/dist/nodes/LimeCrm/GenericTypes.d.ts +0 -80
- package/dist/nodes/LimeCrm/GenericTypes.js +0 -7
- package/dist/nodes/LimeCrm/GenericTypes.js.map +0 -1
- package/dist/nodes/LimeCrm/LimeCrmNode.node.d.ts +0 -17
- package/dist/nodes/LimeCrm/LimeCrmNode.node.js +0 -114
- package/dist/nodes/LimeCrm/LimeCrmNode.node.js.map +0 -1
- package/dist/nodes/LimeCrm/LimeCrmTrigger/LimeCrmTrigger.node.d.ts +0 -17
- package/dist/nodes/LimeCrm/LimeCrmTrigger/LimeCrmTrigger.node.js +0 -408
- package/dist/nodes/LimeCrm/LimeCrmTrigger/LimeCrmTrigger.node.js.map +0 -1
- package/dist/nodes/LimeCrm/LimeCrmTrigger.node.d.ts +0 -17
- package/dist/nodes/LimeCrm/LimeCrmTrigger.node.js +0 -439
- package/dist/nodes/LimeCrm/LimeCrmTrigger.node.js.map +0 -1
- package/dist/nodes/LimeCrm/lime-crm.svg +0 -1
- package/dist/nodes/LimeCrm/methods/getAllSortableFields.d.ts +0 -7
- package/dist/nodes/LimeCrm/methods/getAllSortableFields.js +0 -53
- package/dist/nodes/LimeCrm/methods/getAllSortableFields.js.map +0 -1
- package/dist/nodes/LimeCrm/methods/getLimeTypeProperties.d.ts +0 -3
- package/dist/nodes/LimeCrm/methods/getLimeTypeProperties.js +0 -40
- package/dist/nodes/LimeCrm/methods/getLimeTypeProperties.js.map +0 -1
- package/dist/nodes/LimeCrm/methods/getLimeTypeRelations.d.ts +0 -7
- package/dist/nodes/LimeCrm/methods/getLimeTypeRelations.js +0 -30
- package/dist/nodes/LimeCrm/methods/getLimeTypeRelations.js.map +0 -1
- package/dist/nodes/LimeCrm/methods/getLimeTypes.d.ts +0 -3
- package/dist/nodes/LimeCrm/methods/getLimeTypes.js +0 -33
- package/dist/nodes/LimeCrm/methods/getLimeTypes.js.map +0 -1
- package/dist/nodes/LimeCrm/methods/getRelatedTypeProperties.d.ts +0 -7
- package/dist/nodes/LimeCrm/methods/getRelatedTypeProperties.js +0 -39
- package/dist/nodes/LimeCrm/methods/getRelatedTypeProperties.js.map +0 -1
- package/dist/nodes/LimeCrm/methods/index.d.ts +0 -5
- package/dist/nodes/LimeCrm/methods/index.js +0 -14
- package/dist/nodes/LimeCrm/methods/index.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/commonFields.d.ts +0 -4
- package/dist/nodes/LimeCrm/resources/limeObject/commonFields.js +0 -165
- package/dist/nodes/LimeCrm/resources/limeObject/commonFields.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/index.d.ts +0 -6
- package/dist/nodes/LimeCrm/resources/limeObject/index.js +0 -79
- package/dist/nodes/LimeCrm/resources/limeObject/index.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/operations/common.operation.d.ts +0 -2
- package/dist/nodes/LimeCrm/resources/limeObject/operations/common.operation.js +0 -36
- package/dist/nodes/LimeCrm/resources/limeObject/operations/common.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/operations/create.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeObject/operations/create.operation.js +0 -234
- package/dist/nodes/LimeCrm/resources/limeObject/operations/create.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/operations/delete.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeObject/operations/delete.operation.js +0 -136
- package/dist/nodes/LimeCrm/resources/limeObject/operations/delete.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/operations/get.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeObject/operations/get.operation.js +0 -125
- package/dist/nodes/LimeCrm/resources/limeObject/operations/get.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/operations/getAll.operation.d.ts +0 -3
- package/dist/nodes/LimeCrm/resources/limeObject/operations/getAll.operation.js +0 -212
- package/dist/nodes/LimeCrm/resources/limeObject/operations/getAll.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/operations/search.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeObject/operations/search.operation.js +0 -232
- package/dist/nodes/LimeCrm/resources/limeObject/operations/search.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeObject/operations/update.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeObject/operations/update.operation.js +0 -186
- package/dist/nodes/LimeCrm/resources/limeObject/operations/update.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeType/index.d.ts +0 -6
- package/dist/nodes/LimeCrm/resources/limeType/index.js +0 -81
- package/dist/nodes/LimeCrm/resources/limeType/index.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeType/operations/getProperties.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeType/operations/getProperties.operation.js +0 -112
- package/dist/nodes/LimeCrm/resources/limeType/operations/getProperties.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeType/operations/getRelations.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeType/operations/getRelations.operation.js +0 -112
- package/dist/nodes/LimeCrm/resources/limeType/operations/getRelations.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeType/operations/getType.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeType/operations/getType.operation.js +0 -70
- package/dist/nodes/LimeCrm/resources/limeType/operations/getType.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/limeType/operations/listTypes.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/limeType/operations/listTypes.operation.js +0 -86
- package/dist/nodes/LimeCrm/resources/limeType/operations/listTypes.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/queryApi/index.d.ts +0 -6
- package/dist/nodes/LimeCrm/resources/queryApi/index.js +0 -57
- package/dist/nodes/LimeCrm/resources/queryApi/index.js.map +0 -1
- package/dist/nodes/LimeCrm/resources/queryApi/operations/executeQuery.operation.d.ts +0 -9
- package/dist/nodes/LimeCrm/resources/queryApi/operations/executeQuery.operation.js +0 -559
- package/dist/nodes/LimeCrm/resources/queryApi/operations/executeQuery.operation.js.map +0 -1
- package/dist/nodes/LimeCrm/transport/index.d.ts +0 -2
- package/dist/nodes/LimeCrm/transport/index.js +0 -50
- package/dist/nodes/LimeCrm/transport/index.js.map +0 -1
- package/dist/nodes/LimeGo/LimeGo.node.d.ts +0 -8
- package/dist/nodes/LimeGo/LimeGo.node.js +0 -123
- package/dist/nodes/LimeGo/LimeGo.node.js.map +0 -1
- package/dist/nodes/LimeGo/actions/organization/get.operation.d.ts +0 -5
- package/dist/nodes/LimeGo/actions/organization/get.operation.js +0 -39
- package/dist/nodes/LimeGo/actions/organization/get.operation.js.map +0 -1
- package/dist/nodes/LimeGo/actions/organization/getByExternalKey.operation.d.ts +0 -5
- package/dist/nodes/LimeGo/actions/organization/getByExternalKey.operation.js +0 -54
- package/dist/nodes/LimeGo/actions/organization/getByExternalKey.operation.js.map +0 -1
- package/dist/nodes/LimeGo/actions/organization/index.d.ts +0 -7
- package/dist/nodes/LimeGo/actions/organization/index.js +0 -92
- package/dist/nodes/LimeGo/actions/organization/index.js.map +0 -1
- package/dist/nodes/LimeGo/actions/organization/organizationFields.d.ts +0 -2
- package/dist/nodes/LimeGo/actions/organization/organizationFields.js +0 -162
- package/dist/nodes/LimeGo/actions/organization/organizationFields.js.map +0 -1
- package/dist/nodes/LimeGo/actions/organization/search.operation.d.ts +0 -5
- package/dist/nodes/LimeGo/actions/organization/search.operation.js +0 -70
- package/dist/nodes/LimeGo/actions/organization/search.operation.js.map +0 -1
- package/dist/nodes/LimeGo/actions/organization/update.operation.d.ts +0 -5
- package/dist/nodes/LimeGo/actions/organization/update.operation.js +0 -125
- package/dist/nodes/LimeGo/actions/organization/update.operation.js.map +0 -1
- package/dist/nodes/LimeGo/actions/person/createMail.operation.d.ts +0 -7
- package/dist/nodes/LimeGo/actions/person/createMail.operation.js +0 -130
- package/dist/nodes/LimeGo/actions/person/createMail.operation.js.map +0 -1
- package/dist/nodes/LimeGo/actions/person/get.operation.d.ts +0 -7
- package/dist/nodes/LimeGo/actions/person/get.operation.js +0 -45
- package/dist/nodes/LimeGo/actions/person/get.operation.js.map +0 -1
- package/dist/nodes/LimeGo/actions/person/index.d.ts +0 -7
- package/dist/nodes/LimeGo/actions/person/index.js +0 -92
- package/dist/nodes/LimeGo/actions/person/index.js.map +0 -1
- package/dist/nodes/LimeGo/actions/person/personFields.d.ts +0 -2
- package/dist/nodes/LimeGo/actions/person/personFields.js +0 -134
- package/dist/nodes/LimeGo/actions/person/personFields.js.map +0 -1
- package/dist/nodes/LimeGo/actions/person/search.operation.d.ts +0 -7
- package/dist/nodes/LimeGo/actions/person/search.operation.js +0 -81
- package/dist/nodes/LimeGo/actions/person/search.operation.js.map +0 -1
- package/dist/nodes/LimeGo/actions/person/update.operation.d.ts +0 -7
- package/dist/nodes/LimeGo/actions/person/update.operation.js +0 -104
- package/dist/nodes/LimeGo/actions/person/update.operation.js.map +0 -1
- package/dist/nodes/LimeGo/lime-go.svg +0 -1
- package/dist/nodes/LimeGo/transport/graphqlRequest.d.ts +0 -2
- package/dist/nodes/LimeGo/transport/graphqlRequest.js +0 -23
- package/dist/nodes/LimeGo/transport/graphqlRequest.js.map +0 -1
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LimeGo = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const organization_1 = require("./actions/organization");
|
|
6
|
-
const person_1 = require("./actions/person");
|
|
7
|
-
class LimeGo {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.description = {
|
|
10
|
-
displayName: 'Lime Go',
|
|
11
|
-
name: 'limeGo',
|
|
12
|
-
icon: 'file:lime-go.svg',
|
|
13
|
-
group: ['output'],
|
|
14
|
-
version: 1,
|
|
15
|
-
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
16
|
-
description: 'Consume Lime Go API',
|
|
17
|
-
defaults: {
|
|
18
|
-
name: 'Lime Go',
|
|
19
|
-
},
|
|
20
|
-
inputs: ["main"],
|
|
21
|
-
outputs: ["main"],
|
|
22
|
-
credentials: [
|
|
23
|
-
{
|
|
24
|
-
name: 'limeGoApi',
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
properties: [
|
|
29
|
-
{
|
|
30
|
-
displayName: 'Resource',
|
|
31
|
-
name: 'resource',
|
|
32
|
-
type: 'options',
|
|
33
|
-
noDataExpression: true,
|
|
34
|
-
options: [
|
|
35
|
-
{
|
|
36
|
-
name: 'Organization',
|
|
37
|
-
value: 'organization',
|
|
38
|
-
description: 'Work with organization data',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'Person',
|
|
42
|
-
value: 'person',
|
|
43
|
-
description: 'Work with person data',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'Test',
|
|
47
|
-
value: 'test',
|
|
48
|
-
description: 'Test the API',
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
default: 'organization',
|
|
52
|
-
},
|
|
53
|
-
...organization_1.organization.description,
|
|
54
|
-
...person_1.person.description,
|
|
55
|
-
{
|
|
56
|
-
displayName: 'Operation',
|
|
57
|
-
name: 'operation',
|
|
58
|
-
type: 'options',
|
|
59
|
-
noDataExpression: true,
|
|
60
|
-
displayOptions: {
|
|
61
|
-
show: {
|
|
62
|
-
resource: ['test'],
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
options: [
|
|
66
|
-
{
|
|
67
|
-
name: 'Ping',
|
|
68
|
-
value: 'ping',
|
|
69
|
-
description: 'Test that the LIME Go API is alive and kicking.',
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
default: 'ping',
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
};
|
|
76
|
-
this.methods = {
|
|
77
|
-
loadOptions: {},
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
async execute() {
|
|
81
|
-
const items = this.getInputData();
|
|
82
|
-
const returnData = [];
|
|
83
|
-
for (let i = 0; i < items.length; i++) {
|
|
84
|
-
try {
|
|
85
|
-
const resource = this.getNodeParameter('resource', i);
|
|
86
|
-
const operation = this.getNodeParameter('operation', i);
|
|
87
|
-
let responseData;
|
|
88
|
-
if (resource === 'organization') {
|
|
89
|
-
responseData = await organization_1.organization.execute.call(this, { i });
|
|
90
|
-
}
|
|
91
|
-
else if (resource === 'person') {
|
|
92
|
-
responseData = await person_1.person.execute.call(this, { i });
|
|
93
|
-
}
|
|
94
|
-
else if (resource === 'test' && operation === 'ping') {
|
|
95
|
-
responseData = await this.helpers.requestWithAuthentication.call(this, 'limeGoApi', {
|
|
96
|
-
method: 'GET',
|
|
97
|
-
url: 'https://api.lime-go.com/v1/ping',
|
|
98
|
-
json: true,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported for resource "${resource}"!`, {
|
|
103
|
-
itemIndex: i,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray([responseData]), { itemData: { item: i } });
|
|
107
|
-
returnData.push(...executionData);
|
|
108
|
-
}
|
|
109
|
-
catch (error) {
|
|
110
|
-
if (this.continueOnFail()) {
|
|
111
|
-
returnData.push({ json: { error: error.message } });
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
throw error;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return [returnData];
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.LimeGo = LimeGo;
|
|
123
|
-
//# sourceMappingURL=LimeGo.node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LimeGo.node.js","sourceRoot":"","sources":["../../../nodes/LimeGo/LimeGo.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAGtB,yDAAsD;AACtD,6CAA0C;AAE1C,MAAa,MAAM;IAAnB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,cAAc;4BACpB,KAAK,EAAE,cAAc;4BACrB,WAAW,EAAE,6BAA6B;yBAC1C;wBACD;4BACC,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,QAAQ;4BACf,WAAW,EAAE,uBAAuB;yBACpC;wBACD;4BACC,IAAI,EAAE,MAAM;4BACZ,KAAK,EAAE,MAAM;4BACb,WAAW,EAAE,cAAc;yBAC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C,CAAC;iBACtD;qBAAM,IAAI,QAAQ,KAAK,MAAM,IAAI,SAAS,KAAK,MAAM,EAAE;oBAEvD,YAAY,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAC/D,IAAI,EACJ,WAAW,EACX;wBACC,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,iCAAiC;wBACtC,IAAI,EAAE,IAAI;qBACV,CACD,CAAC;iBACF;qBAAM;oBACN,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,kBAAkB,SAAS,oCAAoC,QAAQ,IAAI,EAAE;wBACzH,SAAS,EAAE,CAAC;qBACZ,CAAC,CAAC;iBACH;gBAGD,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAC5D,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC,EAC5C,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CACzB,CAAC;gBACF,UAAU,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;aAElC;YAAC,OAAO,KAAK,EAAE;gBACf,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;oBAC1B,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;oBACpD,SAAS;iBACT;qBAAM;oBACN,MAAM,KAAK,CAAC;iBACZ;aACD;SACD;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAnID,wBAmIC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.execute = exports.description = void 0;
|
|
4
|
-
const graphqlRequest_1 = require("../../transport/graphqlRequest");
|
|
5
|
-
const organizationFields_1 = require("./organizationFields");
|
|
6
|
-
exports.description = [
|
|
7
|
-
{
|
|
8
|
-
displayName: 'Organization ID',
|
|
9
|
-
name: 'id',
|
|
10
|
-
type: 'string',
|
|
11
|
-
default: '',
|
|
12
|
-
required: true,
|
|
13
|
-
displayOptions: {
|
|
14
|
-
show: {
|
|
15
|
-
resource: ['organization'],
|
|
16
|
-
operation: ['get'],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
description: 'The ID of the organization to retrieve',
|
|
20
|
-
},
|
|
21
|
-
...organizationFields_1.organizationFields,
|
|
22
|
-
];
|
|
23
|
-
async function execute({ i }) {
|
|
24
|
-
const id = this.getNodeParameter('id', i);
|
|
25
|
-
const returnFields = this.getNodeParameter('returnFields', i);
|
|
26
|
-
const fieldsToReturn = returnFields.join('\n');
|
|
27
|
-
const query = `
|
|
28
|
-
query ($id: ID!) {
|
|
29
|
-
organization(id: $id) {
|
|
30
|
-
${fieldsToReturn}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
const variables = { id };
|
|
35
|
-
const responseData = await graphqlRequest_1.graphqlRequest.call(this, query, variables);
|
|
36
|
-
return responseData.organization;
|
|
37
|
-
}
|
|
38
|
-
exports.execute = execute;
|
|
39
|
-
//# sourceMappingURL=get.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../nodes/LimeGo/actions/organization/get.operation.ts"],"names":[],"mappings":";;;AACA,mEAAgE;AAChE,6DAA0D;AAE7C,QAAA,WAAW,GAAsB;IAC1C;QACI,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,KAAK,CAAC;aACrB;SACJ;QACD,WAAW,EAAE,wCAAwC;KACxD;IACD,GAAG,uCAAkB;CACxB,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,EAAE,CAAC,EAAiB;IACvE,MAAM,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAW,CAAC;IACpD,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAa,CAAC;IAG1E,MAAM,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,KAAK,GAAG;;;MAGZ,cAAc;;;EAGlB,CAAC;IAEC,MAAM,SAAS,GAAG,EAAE,EAAE,EAAE,CAAC;IACzB,MAAM,YAAY,GAAG,MAAM,+BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAEvE,OAAO,YAAY,CAAC,YAAY,CAAC;AACrC,CAAC;AAnBD,0BAmBC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.execute = exports.description = void 0;
|
|
4
|
-
const graphqlRequest_1 = require("../../transport/graphqlRequest");
|
|
5
|
-
const organizationFields_1 = require("./organizationFields");
|
|
6
|
-
exports.description = [
|
|
7
|
-
{
|
|
8
|
-
displayName: 'External Key Value',
|
|
9
|
-
name: 'id',
|
|
10
|
-
type: 'string',
|
|
11
|
-
default: '',
|
|
12
|
-
required: true,
|
|
13
|
-
displayOptions: {
|
|
14
|
-
show: {
|
|
15
|
-
resource: ['organization'],
|
|
16
|
-
operation: ['getByExternalKey'],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
description: 'The external key value to lookup',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
displayName: 'External Key Name',
|
|
23
|
-
name: 'externalKeyName',
|
|
24
|
-
type: 'string',
|
|
25
|
-
default: '',
|
|
26
|
-
required: true,
|
|
27
|
-
displayOptions: {
|
|
28
|
-
show: {
|
|
29
|
-
resource: ['organization'],
|
|
30
|
-
operation: ['getByExternalKey'],
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
description: 'The name of the custom field or __integrationid / __bisnodeid',
|
|
34
|
-
},
|
|
35
|
-
...organizationFields_1.organizationFields,
|
|
36
|
-
];
|
|
37
|
-
async function execute({ i }) {
|
|
38
|
-
const id = this.getNodeParameter('id', i);
|
|
39
|
-
const externalKeyName = this.getNodeParameter('externalKeyName', i);
|
|
40
|
-
const returnFields = this.getNodeParameter('returnFields', i);
|
|
41
|
-
const fieldsToReturn = returnFields.join('\n');
|
|
42
|
-
const query = `
|
|
43
|
-
query ($id: String!, $externalKeyName: String!) {
|
|
44
|
-
organization(id: $id, externalKeyName: $externalKeyName) {
|
|
45
|
-
${fieldsToReturn}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`;
|
|
49
|
-
const variables = { id, externalKeyName };
|
|
50
|
-
const responseData = await graphqlRequest_1.graphqlRequest.call(this, query, variables);
|
|
51
|
-
return responseData.organization;
|
|
52
|
-
}
|
|
53
|
-
exports.execute = execute;
|
|
54
|
-
//# sourceMappingURL=getByExternalKey.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getByExternalKey.operation.js","sourceRoot":"","sources":["../../../../../nodes/LimeGo/actions/organization/getByExternalKey.operation.ts"],"names":[],"mappings":";;;AACA,mEAAgE;AAChE,6DAA0D;AAE7C,QAAA,WAAW,GAAsB;IAC1C;QACI,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAClC;SACJ;QACD,WAAW,EAAE,kCAAkC;KAClD;IACD;QACI,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,kBAAkB,CAAC;aAClC;SACJ;QACD,WAAW,EAAE,+DAA+D;KAC/E;IACD,GAAG,uCAAkB;CACxB,CAAC;AAEK,KAAK,UAAU,OAAO,CAA0B,EAAE,CAAC,EAAiB;IACvE,MAAM,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAW,CAAC;IACpD,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAW,CAAC;IAC9E,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAa,CAAC;IAG1E,MAAM,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,KAAK,GAAG;;;MAGZ,cAAc;;;EAGlB,CAAC;IAEC,MAAM,SAAS,GAAG,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC;IAC1C,MAAM,YAAY,GAAG,MAAM,+BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAEvE,OAAO,YAAY,CAAC,YAAY,CAAC;AACrC,CAAC;AApBD,0BAoBC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
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 (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.organization = void 0;
|
|
27
|
-
const get = __importStar(require("./get.operation"));
|
|
28
|
-
const getByExternalKey = __importStar(require("./getByExternalKey.operation"));
|
|
29
|
-
const search = __importStar(require("./search.operation"));
|
|
30
|
-
const update = __importStar(require("./update.operation"));
|
|
31
|
-
exports.organization = {
|
|
32
|
-
description: [
|
|
33
|
-
{
|
|
34
|
-
displayName: 'Operation',
|
|
35
|
-
name: 'operation',
|
|
36
|
-
type: 'options',
|
|
37
|
-
noDataExpression: true,
|
|
38
|
-
displayOptions: {
|
|
39
|
-
show: {
|
|
40
|
-
resource: ['organization'],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
options: [
|
|
44
|
-
{
|
|
45
|
-
name: 'Get',
|
|
46
|
-
value: 'get',
|
|
47
|
-
description: 'Get a specific organization by ID',
|
|
48
|
-
action: 'Get an organization by ID',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'Get by External Key',
|
|
52
|
-
value: 'getByExternalKey',
|
|
53
|
-
description: 'Get a specific organization by External Key',
|
|
54
|
-
action: 'Get an organization by external key',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'Search',
|
|
58
|
-
value: 'search',
|
|
59
|
-
description: 'Search for organizations',
|
|
60
|
-
action: 'Search organizations',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: 'Update',
|
|
64
|
-
value: 'update',
|
|
65
|
-
description: 'Update an organization',
|
|
66
|
-
action: 'Update an organization',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
default: 'get',
|
|
70
|
-
},
|
|
71
|
-
...get.description,
|
|
72
|
-
...getByExternalKey.description,
|
|
73
|
-
...search.description,
|
|
74
|
-
...update.description,
|
|
75
|
-
],
|
|
76
|
-
execute: async function ({ i }) {
|
|
77
|
-
const operation = this.getNodeParameter('operation', i);
|
|
78
|
-
switch (operation) {
|
|
79
|
-
case 'get':
|
|
80
|
-
return await get.execute.call(this, { i });
|
|
81
|
-
case 'getByExternalKey':
|
|
82
|
-
return await getByExternalKey.execute.call(this, { i });
|
|
83
|
-
case 'search':
|
|
84
|
-
return await search.execute.call(this, { i });
|
|
85
|
-
case 'update':
|
|
86
|
-
return await update.execute.call(this, { i });
|
|
87
|
-
default:
|
|
88
|
-
throw new Error(`The operation "${operation}" is not supported!`);
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/LimeGo/actions/organization/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qDAAuC;AACvC,+EAAiE;AACjE,2DAA6C;AAC7C,2DAA6C;AAEhC,QAAA,YAAY,GAAG;IACxB,WAAW,EAAE;QACT;YACI,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,gBAA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,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;YAClD,KAAK,QAAQ;gBACT,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;YAClD;gBACI,MAAM,IAAI,KAAK,CAAC,kBAAkB,SAAS,qBAAqB,CAAC,CAAC;SACzE;IACL,CAAC;CACJ,CAAC"}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.organizationFields = void 0;
|
|
4
|
-
exports.organizationFields = [
|
|
5
|
-
{
|
|
6
|
-
displayName: 'Return Fields',
|
|
7
|
-
name: 'returnFields',
|
|
8
|
-
type: 'multiOptions',
|
|
9
|
-
options: [
|
|
10
|
-
{
|
|
11
|
-
name: 'ID',
|
|
12
|
-
value: 'id',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: 'Name',
|
|
16
|
-
value: 'name',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: 'City',
|
|
20
|
-
value: 'city',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Email',
|
|
24
|
-
value: 'email',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'Phone Number',
|
|
28
|
-
value: 'phoneNumber',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'Organization Number',
|
|
32
|
-
value: 'organizationNumber',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'Integration ID',
|
|
36
|
-
value: 'integrationId',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'Temperature',
|
|
40
|
-
value: 'temperature',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'Customer Relation',
|
|
44
|
-
value: 'customerRelation',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'Tags',
|
|
48
|
-
value: 'tags',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'Turnover',
|
|
52
|
-
value: 'turnover',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'Number of Employees',
|
|
56
|
-
value: 'numberOfEmployees',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'Responsible Coworker',
|
|
60
|
-
value: 'responsibleCoworker { id name email phoneNumber }',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: 'Custom Fields',
|
|
64
|
-
value: 'customFields { title type value }',
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
default: ['id', 'name'],
|
|
68
|
-
description: 'The fields to return',
|
|
69
|
-
displayOptions: {
|
|
70
|
-
show: {
|
|
71
|
-
resource: ['organization'],
|
|
72
|
-
operation: ['get', 'getByExternalKey', 'search', 'update'],
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
displayName: 'Additional Options',
|
|
78
|
-
name: 'additionalOptions',
|
|
79
|
-
type: 'collection',
|
|
80
|
-
placeholder: 'Add Option',
|
|
81
|
-
default: {},
|
|
82
|
-
displayOptions: {
|
|
83
|
-
show: {
|
|
84
|
-
resource: ['organization'],
|
|
85
|
-
operation: ['get', 'getByExternalKey'],
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
options: [
|
|
89
|
-
{
|
|
90
|
-
displayName: 'Include Employees',
|
|
91
|
-
name: 'includeEmployees',
|
|
92
|
-
type: 'boolean',
|
|
93
|
-
default: false,
|
|
94
|
-
description: 'Whether to include employees connected to the organization',
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
displayName: 'Employee Search Query',
|
|
98
|
-
name: 'employeeQuery',
|
|
99
|
-
type: 'string',
|
|
100
|
-
default: '',
|
|
101
|
-
displayOptions: {
|
|
102
|
-
show: {
|
|
103
|
-
includeEmployees: [true],
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
description: 'Search query for filtering employees',
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
displayName: 'Employee Limit',
|
|
110
|
-
name: 'employeeLimit',
|
|
111
|
-
type: 'number',
|
|
112
|
-
default: 5,
|
|
113
|
-
typeOptions: {
|
|
114
|
-
minValue: 1,
|
|
115
|
-
maxValue: 20,
|
|
116
|
-
},
|
|
117
|
-
displayOptions: {
|
|
118
|
-
show: {
|
|
119
|
-
includeEmployees: [true],
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
description: 'Max number of employees to return',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
displayName: 'Include Deals',
|
|
126
|
-
name: 'includeDeals',
|
|
127
|
-
type: 'boolean',
|
|
128
|
-
default: false,
|
|
129
|
-
description: 'Whether to include deals connected to the organization',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
displayName: 'Deal Search Query',
|
|
133
|
-
name: 'dealQuery',
|
|
134
|
-
type: 'string',
|
|
135
|
-
default: '',
|
|
136
|
-
displayOptions: {
|
|
137
|
-
show: {
|
|
138
|
-
includeDeals: [true],
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
description: 'Search query for filtering deals',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
displayName: 'Deal Limit',
|
|
145
|
-
name: 'dealLimit',
|
|
146
|
-
type: 'number',
|
|
147
|
-
default: 5,
|
|
148
|
-
typeOptions: {
|
|
149
|
-
minValue: 1,
|
|
150
|
-
maxValue: 20,
|
|
151
|
-
},
|
|
152
|
-
displayOptions: {
|
|
153
|
-
show: {
|
|
154
|
-
includeDeals: [true],
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
description: 'Max number of deals to return',
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
},
|
|
161
|
-
];
|
|
162
|
-
//# sourceMappingURL=organizationFields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organizationFields.js","sourceRoot":"","sources":["../../../../../nodes/LimeGo/actions/organization/organizationFields.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACjD;QACI,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,IAAI;aACd;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aAChB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aAChB;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;aACjB;YACD;gBACI,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,aAAa;aACvB;YACD;gBACI,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,oBAAoB;aAC9B;YACD;gBACI,IAAI,EAAE,gBAAgB;gBACtB,KAAK,EAAE,eAAe;aACzB;YACD;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,aAAa;aACvB;YACD;gBACI,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,kBAAkB;aAC5B;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aAChB;YACD;gBACI,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;aACpB;YACD;gBACI,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,mBAAmB;aAC7B;YACD;gBACI,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,mDAAmD;aAC7D;YACD;gBACI,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,mCAAmC;aAC7C;SACJ;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,sBAAsB;QACnC,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE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AW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,cAAc,EAAE;oBACZ,IAAI,EAAE;wBACF,YAAY,EAAE,CAAC,IAAI,CAAC;qBACvB;iBACJ;gBACD,WAAW,EAAE,kCAAkC;aAClD;YACD;gBACI,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE;oBACT,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,EAAE;iBACf;gBACD,cAAc,EAAE;oBACZ,IAAI,EAAE;wBACF,YAAY,EAAE,CAAC,IAAI,CAAC;qBACvB;iBACJ;gBACD,WAAW,EAAE,+BAA+B;aAC/C;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.execute = exports.description = void 0;
|
|
4
|
-
const graphqlRequest_1 = require("../../transport/graphqlRequest");
|
|
5
|
-
const organizationFields_1 = require("./organizationFields");
|
|
6
|
-
exports.description = [
|
|
7
|
-
{
|
|
8
|
-
displayName: 'Search Query',
|
|
9
|
-
name: 'query',
|
|
10
|
-
type: 'string',
|
|
11
|
-
default: '',
|
|
12
|
-
displayOptions: {
|
|
13
|
-
show: {
|
|
14
|
-
resource: ['organization'],
|
|
15
|
-
operation: ['search'],
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
description: 'Search text applied against organization name and address. Leave empty to return all organizations',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
displayName: 'Limit',
|
|
22
|
-
name: 'limit',
|
|
23
|
-
type: 'number',
|
|
24
|
-
default: 10,
|
|
25
|
-
typeOptions: {
|
|
26
|
-
minValue: 1,
|
|
27
|
-
maxValue: 20,
|
|
28
|
-
},
|
|
29
|
-
displayOptions: {
|
|
30
|
-
show: {
|
|
31
|
-
resource: ['organization'],
|
|
32
|
-
operation: ['search'],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
description: 'Max number of results to return (max: 20)',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
displayName: 'Offset',
|
|
39
|
-
name: 'offset',
|
|
40
|
-
type: 'number',
|
|
41
|
-
default: 0,
|
|
42
|
-
displayOptions: {
|
|
43
|
-
show: {
|
|
44
|
-
resource: ['organization'],
|
|
45
|
-
operation: ['search'],
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
description: 'Offset results by this number',
|
|
49
|
-
},
|
|
50
|
-
...organizationFields_1.organizationFields,
|
|
51
|
-
];
|
|
52
|
-
async function execute({ i }) {
|
|
53
|
-
const query = this.getNodeParameter('query', i);
|
|
54
|
-
const limit = this.getNodeParameter('limit', i);
|
|
55
|
-
const offset = this.getNodeParameter('offset', i);
|
|
56
|
-
const returnFields = this.getNodeParameter('returnFields', i);
|
|
57
|
-
const fieldsToReturn = returnFields.join('\n');
|
|
58
|
-
const graphqlQuery = `
|
|
59
|
-
query ($query: String, $first: Int!, $offset: Int!) {
|
|
60
|
-
organizations(query: $query, first: $first, offset: $offset) {
|
|
61
|
-
${fieldsToReturn}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
65
|
-
const variables = { query, first: limit, offset };
|
|
66
|
-
const responseData = await graphqlRequest_1.graphqlRequest.call(this, graphqlQuery, variables);
|
|
67
|
-
return responseData.organizations;
|
|
68
|
-
}
|
|
69
|
-
exports.execute = execute;
|
|
70
|
-
//# sourceMappingURL=search.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.operation.js","sourceRoot":"","sources":["../../../../../nodes/LimeGo/actions/organization/search.operation.ts"],"names":[],"mappings":";;;AACA,mEAAgE;AAChE,6DAA0D;AAE7C,QAAA,WAAW,GAAsB;IAC1C;QACI,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,OAAO;QACb,IAAI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