n8n-nodes-roapp 1.0.7
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/README.md +117 -0
- package/dist/credentials/RoappApi.credentials.d.ts +10 -0
- package/dist/credentials/RoappApi.credentials.js +37 -0
- package/dist/credentials/RoappApi.credentials.js.map +1 -0
- package/dist/nodes/Roapp/Roapp.node.d.ts +18 -0
- package/dist/nodes/Roapp/Roapp.node.js +237 -0
- package/dist/nodes/Roapp/Roapp.node.js.map +1 -0
- package/dist/nodes/Roapp/Roapp.node.json +18 -0
- package/dist/nodes/Roapp/resources/assets/create.d.ts +2 -0
- package/dist/nodes/Roapp/resources/assets/create.js +113 -0
- package/dist/nodes/Roapp/resources/assets/create.js.map +1 -0
- package/dist/nodes/Roapp/resources/assets/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/assets/getAll.js +62 -0
- package/dist/nodes/Roapp/resources/assets/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/assets/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/assets/index.js +69 -0
- package/dist/nodes/Roapp/resources/assets/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/bookings/create.d.ts +2 -0
- package/dist/nodes/Roapp/resources/bookings/create.js +70 -0
- package/dist/nodes/Roapp/resources/bookings/create.js.map +1 -0
- package/dist/nodes/Roapp/resources/bookings/createItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/bookings/createItem.js +86 -0
- package/dist/nodes/Roapp/resources/bookings/createItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/bookings/deleteItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/bookings/deleteItem.js +32 -0
- package/dist/nodes/Roapp/resources/bookings/deleteItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/bookings/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/bookings/getAll.js +201 -0
- package/dist/nodes/Roapp/resources/bookings/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/bookings/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/bookings/index.js +122 -0
- package/dist/nodes/Roapp/resources/bookings/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/bookings/update.d.ts +2 -0
- package/dist/nodes/Roapp/resources/bookings/update.js +50 -0
- package/dist/nodes/Roapp/resources/bookings/update.js.map +1 -0
- package/dist/nodes/Roapp/resources/bookings/updateItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/bookings/updateItem.js +95 -0
- package/dist/nodes/Roapp/resources/bookings/updateItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/catalog/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/catalog/getAll.js +63 -0
- package/dist/nodes/Roapp/resources/catalog/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/catalog/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/catalog/index.js +117 -0
- package/dist/nodes/Roapp/resources/catalog/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/company/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/company/index.js +101 -0
- package/dist/nodes/Roapp/resources/company/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/create.d.ts +2 -0
- package/dist/nodes/Roapp/resources/estimates/create.js +80 -0
- package/dist/nodes/Roapp/resources/estimates/create.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/createComment.d.ts +2 -0
- package/dist/nodes/Roapp/resources/estimates/createComment.js +43 -0
- package/dist/nodes/Roapp/resources/estimates/createComment.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/createItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/estimates/createItem.js +86 -0
- package/dist/nodes/Roapp/resources/estimates/createItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/deleteItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/estimates/deleteItem.js +32 -0
- package/dist/nodes/Roapp/resources/estimates/deleteItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/estimates/getAll.js +63 -0
- package/dist/nodes/Roapp/resources/estimates/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/getPublicUrl.d.ts +2 -0
- package/dist/nodes/Roapp/resources/estimates/getPublicUrl.js +20 -0
- package/dist/nodes/Roapp/resources/estimates/getPublicUrl.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/estimates/index.js +183 -0
- package/dist/nodes/Roapp/resources/estimates/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/updateItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/estimates/updateItem.js +97 -0
- package/dist/nodes/Roapp/resources/estimates/updateItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/estimates/updateStatus.d.ts +2 -0
- package/dist/nodes/Roapp/resources/estimates/updateStatus.js +38 -0
- package/dist/nodes/Roapp/resources/estimates/updateStatus.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/create.d.ts +2 -0
- package/dist/nodes/Roapp/resources/invoices/create.js +401 -0
- package/dist/nodes/Roapp/resources/invoices/create.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/createComment.d.ts +2 -0
- package/dist/nodes/Roapp/resources/invoices/createComment.js +43 -0
- package/dist/nodes/Roapp/resources/invoices/createComment.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/createItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/invoices/createItem.js +90 -0
- package/dist/nodes/Roapp/resources/invoices/createItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/deleteItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/invoices/deleteItem.js +32 -0
- package/dist/nodes/Roapp/resources/invoices/deleteItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/invoices/getAll.js +99 -0
- package/dist/nodes/Roapp/resources/invoices/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/invoices/index.js +147 -0
- package/dist/nodes/Roapp/resources/invoices/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/update.d.ts +2 -0
- package/dist/nodes/Roapp/resources/invoices/update.js +79 -0
- package/dist/nodes/Roapp/resources/invoices/update.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/updateItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/invoices/updateItem.js +98 -0
- package/dist/nodes/Roapp/resources/invoices/updateItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/invoices/updateStatus.d.ts +2 -0
- package/dist/nodes/Roapp/resources/invoices/updateStatus.js +38 -0
- package/dist/nodes/Roapp/resources/invoices/updateStatus.js.map +1 -0
- package/dist/nodes/Roapp/resources/lead/create.d.ts +2 -0
- package/dist/nodes/Roapp/resources/lead/create.js +176 -0
- package/dist/nodes/Roapp/resources/lead/create.js.map +1 -0
- package/dist/nodes/Roapp/resources/lead/createComment.d.ts +2 -0
- package/dist/nodes/Roapp/resources/lead/createComment.js +40 -0
- package/dist/nodes/Roapp/resources/lead/createComment.js.map +1 -0
- package/dist/nodes/Roapp/resources/lead/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/lead/getAll.js +92 -0
- package/dist/nodes/Roapp/resources/lead/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/lead/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/lead/index.js +82 -0
- package/dist/nodes/Roapp/resources/lead/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/lead/updateStatus.d.ts +2 -0
- package/dist/nodes/Roapp/resources/lead/updateStatus.js +38 -0
- package/dist/nodes/Roapp/resources/lead/updateStatus.js.map +1 -0
- package/dist/nodes/Roapp/resources/marketing/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/marketing/index.js +46 -0
- package/dist/nodes/Roapp/resources/marketing/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/create.d.ts +2 -0
- package/dist/nodes/Roapp/resources/orders/create.js +80 -0
- package/dist/nodes/Roapp/resources/orders/create.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/createComment.d.ts +2 -0
- package/dist/nodes/Roapp/resources/orders/createComment.js +43 -0
- package/dist/nodes/Roapp/resources/orders/createComment.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/createItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/orders/createItem.js +86 -0
- package/dist/nodes/Roapp/resources/orders/createItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/deleteItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/orders/deleteItem.js +32 -0
- package/dist/nodes/Roapp/resources/orders/deleteItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/orders/getAll.js +63 -0
- package/dist/nodes/Roapp/resources/orders/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/getPublicUrl.d.ts +2 -0
- package/dist/nodes/Roapp/resources/orders/getPublicUrl.js +20 -0
- package/dist/nodes/Roapp/resources/orders/getPublicUrl.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/orders/index.js +183 -0
- package/dist/nodes/Roapp/resources/orders/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/updateItem.d.ts +2 -0
- package/dist/nodes/Roapp/resources/orders/updateItem.js +97 -0
- package/dist/nodes/Roapp/resources/orders/updateItem.js.map +1 -0
- package/dist/nodes/Roapp/resources/orders/updateStatus.d.ts +2 -0
- package/dist/nodes/Roapp/resources/orders/updateStatus.js +38 -0
- package/dist/nodes/Roapp/resources/orders/updateStatus.js.map +1 -0
- package/dist/nodes/Roapp/resources/organization/create.d.ts +2 -0
- package/dist/nodes/Roapp/resources/organization/create.js +55 -0
- package/dist/nodes/Roapp/resources/organization/create.js.map +1 -0
- package/dist/nodes/Roapp/resources/organization/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/organization/getAll.js +5 -0
- package/dist/nodes/Roapp/resources/organization/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/organization/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/organization/index.js +84 -0
- package/dist/nodes/Roapp/resources/organization/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/person/create.d.ts +2 -0
- package/dist/nodes/Roapp/resources/person/create.js +78 -0
- package/dist/nodes/Roapp/resources/person/create.js.map +1 -0
- package/dist/nodes/Roapp/resources/person/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/person/getAll.js +5 -0
- package/dist/nodes/Roapp/resources/person/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/person/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/person/index.js +83 -0
- package/dist/nodes/Roapp/resources/person/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/sale/getAll.d.ts +2 -0
- package/dist/nodes/Roapp/resources/sale/getAll.js +5 -0
- package/dist/nodes/Roapp/resources/sale/getAll.js.map +1 -0
- package/dist/nodes/Roapp/resources/sale/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/sale/index.js +46 -0
- package/dist/nodes/Roapp/resources/sale/index.js.map +1 -0
- package/dist/nodes/Roapp/resources/warehouse/getStock.d.ts +2 -0
- package/dist/nodes/Roapp/resources/warehouse/getStock.js +92 -0
- package/dist/nodes/Roapp/resources/warehouse/getStock.js.map +1 -0
- package/dist/nodes/Roapp/resources/warehouse/getWarehouses.d.ts +2 -0
- package/dist/nodes/Roapp/resources/warehouse/getWarehouses.js +43 -0
- package/dist/nodes/Roapp/resources/warehouse/getWarehouses.js.map +1 -0
- package/dist/nodes/Roapp/resources/warehouse/index.d.ts +3 -0
- package/dist/nodes/Roapp/resources/warehouse/index.js +47 -0
- package/dist/nodes/Roapp/resources/warehouse/index.js.map +1 -0
- package/dist/nodes/Roapp/roapp.svg +26 -0
- package/dist/nodes/Roapp/roapp_dark.svg +29 -0
- package/dist/nodes/Roapp/shared/methods.d.ts +27 -0
- package/dist/nodes/Roapp/shared/methods.js +576 -0
- package/dist/nodes/Roapp/shared/methods.js.map +1 -0
- package/dist/nodes/Roapp/shared/sharedFields.d.ts +2 -0
- package/dist/nodes/Roapp/shared/sharedFields.js +640 -0
- package/dist/nodes/Roapp/shared/sharedFields.js.map +1 -0
- package/dist/package.json +52 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/organization/getAll.ts"],"names":[],"mappings":";;;AAOa,QAAA,8BAA8B,GAAsB,EAEhE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
export declare const organizationDescription: INodeProperties[];
|
|
3
|
+
export declare function executeOrganizationOperation(this: IExecuteFunctions, operation: string, index: number): Promise<INodeExecutionData[][]>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.organizationDescription = void 0;
|
|
4
|
+
exports.executeOrganizationOperation = executeOrganizationOperation;
|
|
5
|
+
const getAll_1 = require("./getAll");
|
|
6
|
+
const create_1 = require("./create");
|
|
7
|
+
const methods_1 = require("../../shared/methods");
|
|
8
|
+
const showOnlyForCompanies = {
|
|
9
|
+
resource: ['organization'],
|
|
10
|
+
};
|
|
11
|
+
exports.organizationDescription = [
|
|
12
|
+
{
|
|
13
|
+
displayName: 'Operation',
|
|
14
|
+
name: 'operation',
|
|
15
|
+
type: 'options',
|
|
16
|
+
noDataExpression: true,
|
|
17
|
+
displayOptions: {
|
|
18
|
+
show: showOnlyForCompanies,
|
|
19
|
+
},
|
|
20
|
+
options: [
|
|
21
|
+
{
|
|
22
|
+
name: 'Create',
|
|
23
|
+
value: 'create',
|
|
24
|
+
action: 'Create an organization',
|
|
25
|
+
description: 'Create an organization',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Delete',
|
|
29
|
+
value: 'delete',
|
|
30
|
+
action: 'Delete an organization',
|
|
31
|
+
description: 'Delete an organization',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'Get',
|
|
35
|
+
value: 'get',
|
|
36
|
+
action: 'Get an organization',
|
|
37
|
+
description: 'Get the data of a single organization',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'Get Many',
|
|
41
|
+
value: 'getAll',
|
|
42
|
+
action: 'Get companies',
|
|
43
|
+
description: 'Get companies',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Get Organization People',
|
|
47
|
+
value: 'getOrganizationPeople',
|
|
48
|
+
action: 'Get persons connected with an organization',
|
|
49
|
+
description: 'Get persons connected with an organization',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'Update',
|
|
53
|
+
value: 'update',
|
|
54
|
+
action: 'Update an organization',
|
|
55
|
+
description: 'Update an organization',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
default: 'getAll',
|
|
59
|
+
},
|
|
60
|
+
...getAll_1.organozationGetManyDescription,
|
|
61
|
+
...create_1.organizationCreateDescription
|
|
62
|
+
];
|
|
63
|
+
async function executeOrganizationOperation(operation, index) {
|
|
64
|
+
if (operation === 'create') {
|
|
65
|
+
return await methods_1.handleCreateUpdate.call(this, index, `${methods_1.BASE_URL}v2/contacts/organizations`, 'POST');
|
|
66
|
+
}
|
|
67
|
+
else if (operation === 'update') {
|
|
68
|
+
return await methods_1.handleCreateUpdate.call(this, index, `${methods_1.BASE_URL}v2/contacts/organizations/${this.getNodeParameter('organization_id', index)}`, 'PATCH');
|
|
69
|
+
}
|
|
70
|
+
else if (operation === 'delete') {
|
|
71
|
+
return await methods_1.handleCreateUpdate.call(this, index, `${methods_1.BASE_URL}v2/contacts/organizations/${this.getNodeParameter('Id', index)}`, 'DELETE');
|
|
72
|
+
}
|
|
73
|
+
else if (operation === 'getOrganizationPeople') {
|
|
74
|
+
return await methods_1.handleGetAll.call(this, index, `${methods_1.BASE_URL}v2/contacts/organizations/${this.getNodeParameter('Id', index)}/people`);
|
|
75
|
+
}
|
|
76
|
+
else if (operation === 'getAll') {
|
|
77
|
+
return await methods_1.handleGetAll.call(this, index, `${methods_1.BASE_URL}v2/contacts/organizations`);
|
|
78
|
+
}
|
|
79
|
+
else if (operation === 'get') {
|
|
80
|
+
return await methods_1.handleGetOne.call(this, index, `${methods_1.BASE_URL}v2/contacts/organizations/${this.getNodeParameter('Id', index)}`);
|
|
81
|
+
}
|
|
82
|
+
return [[{ json: {} }]];
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/organization/index.ts"],"names":[],"mappings":";;;AA8DA,oEAmBC;AAhFD,qCAA0D;AAC1D,qCAAyD;AACzD,kDAAgG;AAEhG,MAAM,oBAAoB,GAAG;IAC5B,QAAQ,EAAE,CAAC,cAAc,CAAC;CAC1B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,oBAAoB;SAC1B;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,wBAAwB;gBAChC,WAAW,EAAE,wBAAwB;aACrC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,wBAAwB;gBAChC,WAAW,EAAE,wBAAwB;aACrC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,CAAC;SAAM,IAAI,SAAS,KAAK,uBAAuB,EAAE,CAAC;QAClD,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,6BAA6B,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAClI,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QACnC,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,2BAA2B,CAAC,CAAC;IACrF,CAAC;SAAM,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QAChC,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,6BAA6B,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IAC3H,CAAC;IACD,OAAO,CAAC,CAAC,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.personCreateDescription = void 0;
|
|
4
|
+
const showOnlyForPersonCreate = {
|
|
5
|
+
operation: ['create', 'update'],
|
|
6
|
+
resource: ['person'],
|
|
7
|
+
};
|
|
8
|
+
exports.personCreateDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Person ID',
|
|
11
|
+
name: 'person_id',
|
|
12
|
+
type: 'string',
|
|
13
|
+
default: '',
|
|
14
|
+
required: true,
|
|
15
|
+
displayOptions: {
|
|
16
|
+
show: {
|
|
17
|
+
operation: ['update'],
|
|
18
|
+
resource: ['person'],
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'First_name',
|
|
24
|
+
name: 'first_name',
|
|
25
|
+
type: 'string',
|
|
26
|
+
default: '',
|
|
27
|
+
required: true,
|
|
28
|
+
displayOptions: {
|
|
29
|
+
show: showOnlyForPersonCreate,
|
|
30
|
+
},
|
|
31
|
+
description: 'The name of the user',
|
|
32
|
+
routing: {
|
|
33
|
+
send: {
|
|
34
|
+
type: 'body',
|
|
35
|
+
property: 'first_name',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Last_name',
|
|
41
|
+
name: 'last_name',
|
|
42
|
+
type: 'string',
|
|
43
|
+
default: '',
|
|
44
|
+
required: true,
|
|
45
|
+
displayOptions: {
|
|
46
|
+
show: showOnlyForPersonCreate,
|
|
47
|
+
},
|
|
48
|
+
description: 'The last name of the user',
|
|
49
|
+
routing: {
|
|
50
|
+
send: {
|
|
51
|
+
type: 'body',
|
|
52
|
+
property: 'last_name',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Custom Fields',
|
|
58
|
+
name: 'customFields',
|
|
59
|
+
placeholder: 'Add custom field',
|
|
60
|
+
type: 'resourceMapper',
|
|
61
|
+
noDataExpression: true,
|
|
62
|
+
displayOptions: {
|
|
63
|
+
show: showOnlyForPersonCreate,
|
|
64
|
+
},
|
|
65
|
+
default: { mappingMode: 'defineBelow', value: {} },
|
|
66
|
+
typeOptions: {
|
|
67
|
+
loadOptionsDependsOn: [
|
|
68
|
+
'resource',
|
|
69
|
+
'operation',
|
|
70
|
+
],
|
|
71
|
+
resourceMapper: {
|
|
72
|
+
resourceMapperMethod: 'getCustomFields',
|
|
73
|
+
mode: 'add',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/person/create.ts"],"names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E,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,EAAE;QAClD,WAAW,EAAE;YAClB,oBAAoB,EAAE;gBACrB,UAAU;gBACV,WAAW;aACL;YACE,cAAc,EAAE;gBACZ,oBAAoB,EAAE,iBAAiB;gBACvC,IAAI,EAAE,KAAK;aACd;SACJ;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/person/getAll.ts"],"names":[],"mappings":";;;AAOa,QAAA,uBAAuB,GAAsB,EAEzD,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
export declare const personDescription: INodeProperties[];
|
|
3
|
+
export declare function executePersonOperation(this: IExecuteFunctions, operation: string, index: number): Promise<INodeExecutionData[][]>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.personDescription = void 0;
|
|
4
|
+
exports.executePersonOperation = executePersonOperation;
|
|
5
|
+
const create_1 = require("./create");
|
|
6
|
+
const getAll_1 = require("./getAll");
|
|
7
|
+
const methods_1 = require("../../shared/methods");
|
|
8
|
+
const showOnlyForUsers = {
|
|
9
|
+
resource: ['person'],
|
|
10
|
+
};
|
|
11
|
+
exports.personDescription = [
|
|
12
|
+
{
|
|
13
|
+
displayName: 'Operation',
|
|
14
|
+
name: 'operation',
|
|
15
|
+
type: 'options',
|
|
16
|
+
noDataExpression: true,
|
|
17
|
+
displayOptions: {
|
|
18
|
+
show: showOnlyForUsers,
|
|
19
|
+
},
|
|
20
|
+
options: [
|
|
21
|
+
{
|
|
22
|
+
name: 'Create',
|
|
23
|
+
value: 'create',
|
|
24
|
+
action: 'Create a new person',
|
|
25
|
+
description: 'Create a new person',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Delete',
|
|
29
|
+
value: 'delete',
|
|
30
|
+
action: 'Delete a person',
|
|
31
|
+
description: 'Delete a person',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'Get',
|
|
35
|
+
value: 'get',
|
|
36
|
+
action: 'Get a user',
|
|
37
|
+
description: 'Get the data of a single user',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'Get Many',
|
|
41
|
+
value: 'getAll',
|
|
42
|
+
action: 'Get persons',
|
|
43
|
+
description: 'Get many person',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Get Person Organization',
|
|
47
|
+
value: 'getPersonOrganization',
|
|
48
|
+
action: 'Get person organization',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Update',
|
|
52
|
+
value: 'update',
|
|
53
|
+
action: 'Update a person',
|
|
54
|
+
description: 'Update a person',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
default: 'getAll',
|
|
58
|
+
},
|
|
59
|
+
...create_1.personCreateDescription,
|
|
60
|
+
...getAll_1.personGetAllDescription
|
|
61
|
+
];
|
|
62
|
+
async function executePersonOperation(operation, index) {
|
|
63
|
+
if (operation === 'create') {
|
|
64
|
+
return await methods_1.handleCreateUpdate.call(this, index, `${methods_1.BASE_URL}v2/contacts/people`, 'POST');
|
|
65
|
+
}
|
|
66
|
+
else if (operation === 'update') {
|
|
67
|
+
return await methods_1.handleCreateUpdate.call(this, index, `${methods_1.BASE_URL}v2/contacts/people/${this.getNodeParameter('person_id', index)}`, 'PATCH');
|
|
68
|
+
}
|
|
69
|
+
else if (operation === 'delete') {
|
|
70
|
+
return await methods_1.handleCreateUpdate.call(this, index, `${methods_1.BASE_URL}v2/contacts/people/${this.getNodeParameter('Id', index)}`, 'DELETE');
|
|
71
|
+
}
|
|
72
|
+
else if (operation === 'getPersonOrganization') {
|
|
73
|
+
return await methods_1.handleGetOne.call(this, index, `${methods_1.BASE_URL}v2/contacts/people/${this.getNodeParameter('Id', index)}/organizations`);
|
|
74
|
+
}
|
|
75
|
+
else if (operation === 'getAll') {
|
|
76
|
+
return await methods_1.handleGetAll.call(this, index, `${methods_1.BASE_URL}v2/contacts/people`);
|
|
77
|
+
}
|
|
78
|
+
else if (operation === 'get') {
|
|
79
|
+
return await methods_1.handleGetOne.call(this, index, `${methods_1.BASE_URL}v2/contacts/people/${this.getNodeParameter('Id', index)}`);
|
|
80
|
+
}
|
|
81
|
+
return [[{ json: {} }]];
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/person/index.ts"],"names":[],"mappings":";;;AA6DA,wDAmBC;AA/ED,qCAAmD;AACnD,qCAAmD;AACnD,kDAAgG;AAEhG,MAAM,gBAAgB,GAAG;IACxB,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACpB,CAAC;AAEW,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,gBAAgB;SACtB;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,qBAAqB;gBAC7B,WAAW,EAAE,qBAAqB;aAClC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,iBAAiB;gBACzB,WAAW,EAAE,iBAAiB;aAC9B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,YAAY;gBACpB,WAAW,EAAE,+BAA+B;aAC5C;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,MAAM,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AAC;IAClI,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QACnC,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,oBAAoB,CAAC,CAAC;IAC9E,CAAC;SAAM,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QAChC,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,sBAAsB,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IACpH,CAAC;IACD,OAAO,CAAC,CAAC,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/sale/getAll.ts"],"names":[],"mappings":";;;AAOa,QAAA,sBAAsB,GAAsB,EAExD,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
export declare const saleDescription: INodeProperties[];
|
|
3
|
+
export declare function executeSaleOperation(this: IExecuteFunctions, operation: string, index: number): Promise<INodeExecutionData[][]>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.saleDescription = void 0;
|
|
4
|
+
exports.executeSaleOperation = executeSaleOperation;
|
|
5
|
+
const getAll_1 = require("./getAll");
|
|
6
|
+
const methods_1 = require("../../shared/methods");
|
|
7
|
+
const showOnlyForCompanies = {
|
|
8
|
+
resource: ['sale'],
|
|
9
|
+
};
|
|
10
|
+
exports.saleDescription = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Operation',
|
|
13
|
+
name: 'operation',
|
|
14
|
+
type: 'options',
|
|
15
|
+
noDataExpression: true,
|
|
16
|
+
displayOptions: {
|
|
17
|
+
show: showOnlyForCompanies,
|
|
18
|
+
},
|
|
19
|
+
options: [
|
|
20
|
+
{
|
|
21
|
+
name: 'Get',
|
|
22
|
+
value: 'get',
|
|
23
|
+
action: 'Get sale by id',
|
|
24
|
+
description: 'Get sale by ID',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Get Many',
|
|
28
|
+
value: 'getAll',
|
|
29
|
+
action: 'Get sales',
|
|
30
|
+
description: 'Get sales',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
default: 'getAll',
|
|
34
|
+
},
|
|
35
|
+
...getAll_1.saleGetManyDescription,
|
|
36
|
+
];
|
|
37
|
+
async function executeSaleOperation(operation, index) {
|
|
38
|
+
if (operation === 'getAll') {
|
|
39
|
+
return await methods_1.handleGetAll.call(this, index, `${methods_1.BASE_URL}v2/sales`);
|
|
40
|
+
}
|
|
41
|
+
else if (operation === 'get') {
|
|
42
|
+
return await methods_1.handleGetOne.call(this, index, `${methods_1.BASE_URL}v2/sales/${this.getNodeParameter('Id', index)}`);
|
|
43
|
+
}
|
|
44
|
+
return [[{ json: {} }]];
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/sale/index.ts"],"names":[],"mappings":";;;AAoCA,oDAWC;AA9CD,qCAAkD;AAClD,kDAA2E;AAE3E,MAAM,oBAAoB,GAAG;IAC5B,QAAQ,EAAE,CAAC,MAAM,CAAC;CAClB,CAAC;AAEW,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,oBAAoB;SAC1B;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,gBAAgB;gBACxB,WAAW,EAAE,gBAAgB;aAC7B;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,WAAW;aACxB;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;IACD,GAAG,+BAAsB;CACzB,CAAC;AAEK,KAAK,UAAU,oBAAoB,CAEzC,SAAiB,EACjB,KAAa;IAEb,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,UAAU,CAAC,CAAC;IACpE,CAAC;SAAM,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QAChC,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,YAAY,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IAC1G,CAAC;IACD,OAAO,CAAC,CAAC,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.warehouseGetStockDescription = void 0;
|
|
4
|
+
const showOnlyForGetStock = {
|
|
5
|
+
operation: ['getStock'],
|
|
6
|
+
resource: ['warehouse'],
|
|
7
|
+
};
|
|
8
|
+
exports.warehouseGetStockDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Warehouse ID',
|
|
11
|
+
name: "warehouse_id",
|
|
12
|
+
type: 'number',
|
|
13
|
+
required: true,
|
|
14
|
+
default: 0,
|
|
15
|
+
displayOptions: {
|
|
16
|
+
show: showOnlyForGetStock
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Title',
|
|
21
|
+
name: 'title',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: '',
|
|
24
|
+
description: 'Filter by product title',
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: showOnlyForGetStock
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
displayName: 'Product ID',
|
|
31
|
+
name: 'ids',
|
|
32
|
+
type: 'string',
|
|
33
|
+
typeOptions: {
|
|
34
|
+
multipleValues: true,
|
|
35
|
+
},
|
|
36
|
+
default: [],
|
|
37
|
+
description: 'Filter by product IDs. Specify one or more IDs using an <a href="https://n8n.io">expression</a>.',
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: showOnlyForGetStock,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Categories ID',
|
|
44
|
+
name: 'categories',
|
|
45
|
+
type: 'string',
|
|
46
|
+
typeOptions: {
|
|
47
|
+
multipleValues: true,
|
|
48
|
+
},
|
|
49
|
+
default: [],
|
|
50
|
+
description: 'Filter by category IDs. Specify one or more IDs using an <a href="https://n8n.io">expression</a>.',
|
|
51
|
+
displayOptions: {
|
|
52
|
+
show: showOnlyForGetStock,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Articles ID',
|
|
57
|
+
name: 'articles',
|
|
58
|
+
type: 'string',
|
|
59
|
+
typeOptions: {
|
|
60
|
+
multipleValues: true,
|
|
61
|
+
},
|
|
62
|
+
default: [],
|
|
63
|
+
description: 'Filter by article IDs. Specify one or more IDs using an <a href="https://n8n.io">expression</a>.',
|
|
64
|
+
displayOptions: {
|
|
65
|
+
show: showOnlyForGetStock,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Barcodes ID',
|
|
70
|
+
name: 'barcodes',
|
|
71
|
+
type: 'string',
|
|
72
|
+
typeOptions: {
|
|
73
|
+
multipleValues: true,
|
|
74
|
+
},
|
|
75
|
+
default: [],
|
|
76
|
+
description: 'Filter by barcode IDs. Specify one or more IDs using an <a href="https://n8n.io">expression</a>.',
|
|
77
|
+
displayOptions: {
|
|
78
|
+
show: showOnlyForGetStock,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
displayName: 'Exclude Zero Residue',
|
|
83
|
+
name: 'exclude_zero_residue',
|
|
84
|
+
type: 'boolean',
|
|
85
|
+
default: false,
|
|
86
|
+
description: 'Whether Return only products with non-zero residue',
|
|
87
|
+
displayOptions: {
|
|
88
|
+
show: showOnlyForGetStock,
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
//# sourceMappingURL=getStock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getStock.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/warehouse/getStock.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAG;IAC3B,SAAS,EAAE,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,WAAW,CAAC;CACvB,CAAC;AAEW,QAAA,4BAA4B,GAAsB;IAC9D;QACC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC;QACV,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;KACD;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,yBAAyB;QACtC,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;KACD;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kGAAkG;QAC/G,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;KACD;IACD;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,mGAAmG;QAChH,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;KACD;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAC,EAAE;QACV,WAAW,EAAE,kGAAkG;QAC/G,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;KACD;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAC,EAAE;QACV,WAAW,EAAE,kGAAkG;QAC/G,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;KACD;IACD;QACC,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,oDAAoD;QACjE,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.warehouseGetWhDescription = void 0;
|
|
4
|
+
const showOnlyForGetWarehouses = {
|
|
5
|
+
operation: ['getWarehouses'],
|
|
6
|
+
resource: ['warehouse'],
|
|
7
|
+
};
|
|
8
|
+
exports.warehouseGetWhDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Location Name or ID',
|
|
11
|
+
name: 'branch_id',
|
|
12
|
+
type: 'options',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForGetWarehouses,
|
|
16
|
+
},
|
|
17
|
+
typeOptions: {
|
|
18
|
+
loadOptionsDependsOn: [
|
|
19
|
+
'resource',
|
|
20
|
+
'operation',
|
|
21
|
+
],
|
|
22
|
+
loadOptionsMethod: 'getLocations',
|
|
23
|
+
reloadNodeOptions: true,
|
|
24
|
+
},
|
|
25
|
+
default: [],
|
|
26
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
displayName: "Type",
|
|
30
|
+
name: "type",
|
|
31
|
+
type: "options",
|
|
32
|
+
default: 'product',
|
|
33
|
+
options: [
|
|
34
|
+
{ name: 'Product', value: 'product' },
|
|
35
|
+
{ name: 'Asset', value: 'asset' },
|
|
36
|
+
{ name: 'All', value: '' },
|
|
37
|
+
],
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: showOnlyForGetWarehouses
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
//# sourceMappingURL=getWarehouses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWarehouses.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/warehouse/getWarehouses.ts"],"names":[],"mappings":";;;AAEA,MAAM,wBAAwB,GAAG;IAChC,SAAS,EAAE,CAAC,eAAe,CAAC;IAC5B,QAAQ,EAAE,CAAC,WAAW,CAAC;CACvB,CAAC;AAEW,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,wBAAwB;SAC9B;QACD,WAAW,EAAE;YACZ,oBAAoB,EAAE;gBACrB,UAAU;gBACV,WAAW;aACX;YACD,iBAAiB,EAAE,cAAc;YACjC,iBAAiB,EAAE,IAAI;SACvB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gHAAgH;KAC7H;IACE;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE;YACL,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;YACrC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;YACjC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;SAC7B;QACD,cAAc,EAAE;YACZ,IAAI,EAAE,wBAAwB;SACjC;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
export declare const warehouseDescription: INodeProperties[];
|
|
3
|
+
export declare function executeWarehouseOperation(this: IExecuteFunctions, operation: string, index: number): Promise<INodeExecutionData[][]>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.warehouseDescription = void 0;
|
|
4
|
+
exports.executeWarehouseOperation = executeWarehouseOperation;
|
|
5
|
+
const getWarehouses_1 = require("./getWarehouses");
|
|
6
|
+
const getStock_1 = require("./getStock");
|
|
7
|
+
const methods_1 = require("../../shared/methods");
|
|
8
|
+
const showOnlyForWarehouse = {
|
|
9
|
+
resource: ['warehouse'],
|
|
10
|
+
};
|
|
11
|
+
exports.warehouseDescription = [
|
|
12
|
+
{
|
|
13
|
+
displayName: 'Operation',
|
|
14
|
+
name: 'operation',
|
|
15
|
+
type: 'options',
|
|
16
|
+
noDataExpression: true,
|
|
17
|
+
displayOptions: {
|
|
18
|
+
show: showOnlyForWarehouse,
|
|
19
|
+
},
|
|
20
|
+
options: [
|
|
21
|
+
{
|
|
22
|
+
name: 'Get Warehouses',
|
|
23
|
+
value: 'getWarehouses',
|
|
24
|
+
action: 'Get warehouses',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Get Stock',
|
|
28
|
+
value: 'getStock',
|
|
29
|
+
action: 'Get stock by warehouse',
|
|
30
|
+
description: 'Get Stock by warehouse',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
default: 'getWarehouses',
|
|
34
|
+
},
|
|
35
|
+
...getWarehouses_1.warehouseGetWhDescription,
|
|
36
|
+
...getStock_1.warehouseGetStockDescription
|
|
37
|
+
];
|
|
38
|
+
async function executeWarehouseOperation(operation, index) {
|
|
39
|
+
if (operation === 'getWarehouses') {
|
|
40
|
+
return await methods_1.handleGetAll.call(this, index, `${methods_1.BASE_URL}warehouse/`);
|
|
41
|
+
}
|
|
42
|
+
else if (operation === 'getStock') {
|
|
43
|
+
return await methods_1.handleGetAll.call(this, index, `${methods_1.BASE_URL}warehouse/goods/${this.getNodeParameter('warehouse_id', index)}`);
|
|
44
|
+
}
|
|
45
|
+
return [[{ json: {} }]];
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/warehouse/index.ts"],"names":[],"mappings":";;;AAqCA,8DAWC;AA/CD,mDAA4D;AAC5D,yCAA0D;AAC1D,kDAA6D;AAE7D,MAAM,oBAAoB,GAAG;IAC5B,QAAQ,EAAE,CAAC,WAAW,CAAC;CACvB,CAAC;AAEW,QAAA,oBAAoB,GAAsB;IACtD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,oBAAoB;SAC1B;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,gBAAgB;gBACtB,KAAK,EAAE,eAAe;gBACtB,MAAM,EAAE,gBAAgB;aACxB;YACD;gBACC,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,wBAAwB;gBAChC,WAAW,EAAE,wBAAwB;aACrC;SACD;QACD,OAAO,EAAE,eAAe;KACxB;IACD,GAAG,yCAAyB;IAC5B,GAAG,uCAA4B;CAC/B,CAAC;AAEK,KAAK,UAAU,yBAAyB,CAE9C,SAAiB,EACjB,KAAa;IAEb,IAAI,SAAS,KAAK,eAAe,EAAE,CAAC;QACnC,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,YAAY,CAAC,CAAC;IACtE,CAAC;SAAM,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QACrC,OAAO,MAAM,sBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAQ,mBAAmB,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IAC3H,CAAC;IACD,OAAO,CAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,CAAC,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500" width="100%" height="100%">
|
|
2
|
+
<style>
|
|
3
|
+
.brand-blue { fill: #0066ff; }
|
|
4
|
+
.brand-light-blue { fill: #cce0ff; }
|
|
5
|
+
.brand-dark { fill: #111827; }
|
|
6
|
+
.text-main { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-weight: 500; }
|
|
7
|
+
</style>
|
|
8
|
+
|
|
9
|
+
<g transform="translate(110, 210)">
|
|
10
|
+
<!-- Буква R -->
|
|
11
|
+
<path class="brand-blue" d="M0,52 L0,2 H27 C38,2 47,8 47,21 C47,31 40,37 31,39 L50,52 L36,52 L19,40 L12,40 L12,52 Z M12,30 L25,30 C32,30 36,27 36,21 C36,15 32,12 25,12 L12,12 Z" />
|
|
12
|
+
|
|
13
|
+
<!-- Буква o (Кастомный элемент со стрелкой) -->
|
|
14
|
+
<g transform="translate(56, 16)">
|
|
15
|
+
<!-- Основное полукольцо стрелки -->
|
|
16
|
+
<path class="brand-blue" d="M37,18 C37,8 29,0 18,0 C8,0 0,8 0,18 C0,28 8,36 18,36 L18,25 C14,25 11,22 11,18 C11,14 14,11 18,11 C22,11 25,14 25,18 L25,23 L30,19 L37,25 Z" />
|
|
17
|
+
<!-- Наконечник стрелки -->
|
|
18
|
+
<polygon class="brand-blue" points="30,19 40,19 35,27" />
|
|
19
|
+
<!-- Светло-голубой квадратик снизу справа -->
|
|
20
|
+
<rect class="brand-light-blue" x="25" y="25" width="11" height="11" />
|
|
21
|
+
</g>
|
|
22
|
+
|
|
23
|
+
<!-- Текст "app" -->
|
|
24
|
+
<text x="112" y="45" font-size="58" class="brand-dark text-main" letter-spacing="-2">app</text>
|
|
25
|
+
</g>
|
|
26
|
+
</svg>
|