@probo/n8n-nodes-probo 0.106.0 → 0.107.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/dist/nodes/Probo/actions/vendor/createService.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/vendor/createService.operation.js +83 -0
- package/dist/nodes/Probo/actions/vendor/createService.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/vendor/deleteService.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/vendor/deleteService.operation.js +37 -0
- package/dist/nodes/Probo/actions/vendor/deleteService.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/vendor/getAllServices.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/vendor/getAllServices.operation.js +119 -0
- package/dist/nodes/Probo/actions/vendor/getAllServices.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/vendor/getService.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/vendor/getService.operation.js +76 -0
- package/dist/nodes/Probo/actions/vendor/getService.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/vendor/index.d.ts +6 -1
- package/dist/nodes/Probo/actions/vendor/index.js +46 -1
- package/dist/nodes/Probo/actions/vendor/index.js.map +1 -1
- package/dist/nodes/Probo/actions/vendor/updateService.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/vendor/updateService.operation.js +79 -0
- package/dist/nodes/Probo/actions/vendor/updateService.operation.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Vendor ID',
|
|
9
|
+
name: 'vendorId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['vendor'],
|
|
14
|
+
operation: ['createService'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the vendor',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Name',
|
|
23
|
+
name: 'name',
|
|
24
|
+
type: 'string',
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: {
|
|
27
|
+
resource: ['vendor'],
|
|
28
|
+
operation: ['createService'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
default: '',
|
|
32
|
+
description: 'The name of the vendor service',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Description',
|
|
37
|
+
name: 'description',
|
|
38
|
+
type: 'string',
|
|
39
|
+
typeOptions: {
|
|
40
|
+
rows: 4,
|
|
41
|
+
},
|
|
42
|
+
displayOptions: {
|
|
43
|
+
show: {
|
|
44
|
+
resource: ['vendor'],
|
|
45
|
+
operation: ['createService'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
default: '',
|
|
49
|
+
description: 'The description of the vendor service',
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
async function execute(itemIndex) {
|
|
53
|
+
const vendorId = this.getNodeParameter('vendorId', itemIndex);
|
|
54
|
+
const name = this.getNodeParameter('name', itemIndex);
|
|
55
|
+
const description = this.getNodeParameter('description', itemIndex, '');
|
|
56
|
+
const query = `
|
|
57
|
+
mutation CreateVendorService($input: CreateVendorServiceInput!) {
|
|
58
|
+
createVendorService(input: $input) {
|
|
59
|
+
vendorServiceEdge {
|
|
60
|
+
node {
|
|
61
|
+
id
|
|
62
|
+
name
|
|
63
|
+
description
|
|
64
|
+
createdAt
|
|
65
|
+
updatedAt
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
const input = {
|
|
72
|
+
vendorId,
|
|
73
|
+
name,
|
|
74
|
+
};
|
|
75
|
+
if (description)
|
|
76
|
+
input.description = description;
|
|
77
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
|
|
78
|
+
return {
|
|
79
|
+
json: responseData,
|
|
80
|
+
pairedItem: { item: itemIndex },
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=createService.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createService.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/vendor/createService.operation.ts"],"names":[],"mappings":";;;AAkDA,0BAoCC;AArFD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,eAAe,CAAC;aAC5B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,sBAAsB;QACnC,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,eAAe,CAAC;aAC5B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,IAAI,EAAE,CAAC;SACP;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,eAAe,CAAC;aAC5B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,uCAAuC;KACpD;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAW,CAAC;IACxE,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAW,CAAC;IAChE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,SAAS,EAAE,EAAE,CAAW,CAAC;IAElF,MAAM,KAAK,GAAG;;;;;;;;;;;;;;EAcb,CAAC;IAEF,MAAM,KAAK,GAA4B;QACtC,QAAQ;QACR,IAAI;KACJ,CAAC;IACF,IAAI,WAAW;QAAE,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;IAEjD,MAAM,YAAY,GAAG,MAAM,kCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAExE,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Vendor Service ID',
|
|
9
|
+
name: 'vendorServiceId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['vendor'],
|
|
14
|
+
operation: ['deleteService'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the vendor service to delete',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
async function execute(itemIndex) {
|
|
23
|
+
const vendorServiceId = this.getNodeParameter('vendorServiceId', itemIndex);
|
|
24
|
+
const query = `
|
|
25
|
+
mutation DeleteVendorService($input: DeleteVendorServiceInput!) {
|
|
26
|
+
deleteVendorService(input: $input) {
|
|
27
|
+
deletedVendorServiceId
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input: { vendorServiceId } });
|
|
32
|
+
return {
|
|
33
|
+
json: responseData,
|
|
34
|
+
pairedItem: { item: itemIndex },
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=deleteService.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteService.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/vendor/deleteService.operation.ts"],"names":[],"mappings":";;;AAoBA,0BAoBC;AAvCD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,eAAe,CAAC;aAC5B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,SAAS,CAAW,CAAC;IAEtF,MAAM,KAAK,GAAG;;;;;;EAMb,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,kCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC;IAE7F,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Vendor ID',
|
|
9
|
+
name: 'vendorId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['vendor'],
|
|
14
|
+
operation: ['getAllServices'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the vendor',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Return All',
|
|
23
|
+
name: 'returnAll',
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: {
|
|
27
|
+
resource: ['vendor'],
|
|
28
|
+
operation: ['getAllServices'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
default: false,
|
|
32
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Limit',
|
|
36
|
+
name: 'limit',
|
|
37
|
+
type: 'number',
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: {
|
|
40
|
+
resource: ['vendor'],
|
|
41
|
+
operation: ['getAllServices'],
|
|
42
|
+
returnAll: [false],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
typeOptions: {
|
|
46
|
+
minValue: 1,
|
|
47
|
+
},
|
|
48
|
+
default: 50,
|
|
49
|
+
description: 'Max number of results to return',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Options',
|
|
53
|
+
name: 'options',
|
|
54
|
+
type: 'collection',
|
|
55
|
+
placeholder: 'Add Option',
|
|
56
|
+
default: {},
|
|
57
|
+
displayOptions: {
|
|
58
|
+
show: {
|
|
59
|
+
resource: ['vendor'],
|
|
60
|
+
operation: ['getAllServices'],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
options: [
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Include Vendor',
|
|
66
|
+
name: 'includeVendor',
|
|
67
|
+
type: 'boolean',
|
|
68
|
+
default: false,
|
|
69
|
+
description: 'Whether to include vendor in the response',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
async function execute(itemIndex) {
|
|
75
|
+
const vendorId = this.getNodeParameter('vendorId', itemIndex);
|
|
76
|
+
const returnAll = this.getNodeParameter('returnAll', itemIndex);
|
|
77
|
+
const limit = this.getNodeParameter('limit', itemIndex, 50);
|
|
78
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
79
|
+
const vendorFragment = options.includeVendor
|
|
80
|
+
? `vendor {
|
|
81
|
+
id
|
|
82
|
+
name
|
|
83
|
+
}`
|
|
84
|
+
: '';
|
|
85
|
+
const query = `
|
|
86
|
+
query GetVendorServices($vendorId: ID!, $first: Int, $after: CursorKey) {
|
|
87
|
+
node(id: $vendorId) {
|
|
88
|
+
... on Vendor {
|
|
89
|
+
services(first: $first, after: $after) {
|
|
90
|
+
edges {
|
|
91
|
+
node {
|
|
92
|
+
id
|
|
93
|
+
name
|
|
94
|
+
description
|
|
95
|
+
${vendorFragment}
|
|
96
|
+
createdAt
|
|
97
|
+
updatedAt
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
pageInfo {
|
|
101
|
+
hasNextPage
|
|
102
|
+
endCursor
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
`;
|
|
109
|
+
const vendorServices = await GenericFunctions_1.proboApiRequestAllItems.call(this, query, { vendorId }, (response) => {
|
|
110
|
+
const data = response === null || response === void 0 ? void 0 : response.data;
|
|
111
|
+
const node = data === null || data === void 0 ? void 0 : data.node;
|
|
112
|
+
return node === null || node === void 0 ? void 0 : node.services;
|
|
113
|
+
}, returnAll, limit);
|
|
114
|
+
return {
|
|
115
|
+
json: { vendorServices },
|
|
116
|
+
pairedItem: { item: itemIndex },
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=getAllServices.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAllServices.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/vendor/getAllServices.operation.ts"],"names":[],"mappings":";;;AAwEA,0BA4DC;AAnID,6DAAiE;AAEpD,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC7B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,sBAAsB;QACnC,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC7B;SACD;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,2DAA2D;KACxE;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,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Ac;;;;;;;;;;;;;EAatB,CAAC;IAEF,MAAM,cAAc,GAAG,MAAM,0CAAuB,CAAC,IAAI,CACxD,IAAI,EACJ,KAAK,EACL,EAAE,QAAQ,EAAE,EACZ,CAAC,QAAQ,EAAE,EAAE;QACZ,MAAM,IAAI,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAA+B,CAAC;QACvD,MAAM,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAA+B,CAAC;QACnD,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAmC,CAAC;IAClD,CAAC,EACD,SAAS,EACT,KAAK,CACL,CAAC;IAEF,OAAO;QACN,IAAI,EAAE,EAAE,cAAc,EAAE;QACxB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Vendor Service ID',
|
|
9
|
+
name: 'vendorServiceId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['vendor'],
|
|
14
|
+
operation: ['getService'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the vendor service',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Options',
|
|
23
|
+
name: 'options',
|
|
24
|
+
type: 'collection',
|
|
25
|
+
placeholder: 'Add Option',
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: {
|
|
28
|
+
show: {
|
|
29
|
+
resource: ['vendor'],
|
|
30
|
+
operation: ['getService'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Include Vendor',
|
|
36
|
+
name: 'includeVendor',
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: false,
|
|
39
|
+
description: 'Whether to include vendor in the response',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
async function execute(itemIndex) {
|
|
45
|
+
const vendorServiceId = this.getNodeParameter('vendorServiceId', itemIndex);
|
|
46
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
47
|
+
const vendorFragment = options.includeVendor
|
|
48
|
+
? `vendor {
|
|
49
|
+
id
|
|
50
|
+
name
|
|
51
|
+
}`
|
|
52
|
+
: '';
|
|
53
|
+
const query = `
|
|
54
|
+
query GetVendorService($vendorServiceId: ID!) {
|
|
55
|
+
node(id: $vendorServiceId) {
|
|
56
|
+
... on VendorService {
|
|
57
|
+
id
|
|
58
|
+
name
|
|
59
|
+
description
|
|
60
|
+
${vendorFragment}
|
|
61
|
+
createdAt
|
|
62
|
+
updatedAt
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
const variables = {
|
|
68
|
+
vendorServiceId,
|
|
69
|
+
};
|
|
70
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, variables);
|
|
71
|
+
return {
|
|
72
|
+
json: responseData,
|
|
73
|
+
pairedItem: { item: itemIndex },
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=getService.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getService.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/vendor/getService.operation.ts"],"names":[],"mappings":";;;AA0CA,0BAyCC;AAlFD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,mBAAmB;QAChC,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U,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -4,5 +4,10 @@ import * as updateOp from './update.operation';
|
|
|
4
4
|
import * as deleteOp from './delete.operation';
|
|
5
5
|
import * as getOp from './get.operation';
|
|
6
6
|
import * as getAllOp from './getAll.operation';
|
|
7
|
+
import * as createServiceOp from './createService.operation';
|
|
8
|
+
import * as updateServiceOp from './updateService.operation';
|
|
9
|
+
import * as deleteServiceOp from './deleteService.operation';
|
|
10
|
+
import * as getServiceOp from './getService.operation';
|
|
11
|
+
import * as getAllServicesOp from './getAllServices.operation';
|
|
7
12
|
export declare const description: INodeProperties[];
|
|
8
|
-
export { createOp as create, updateOp as update, deleteOp as delete, getOp as get, getAllOp as getAll };
|
|
13
|
+
export { createOp as create, updateOp as update, deleteOp as delete, getOp as get, getAllOp as getAll, createServiceOp as createService, updateServiceOp as updateService, deleteServiceOp as deleteService, getServiceOp as getService, getAllServicesOp as getAllServices, };
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.getAll = exports.get = exports.delete = exports.update = exports.create = exports.description = void 0;
|
|
36
|
+
exports.getAllServices = exports.getService = exports.deleteService = exports.updateService = exports.createService = exports.getAll = exports.get = exports.delete = exports.update = exports.create = exports.description = void 0;
|
|
37
37
|
const createOp = __importStar(require("./create.operation"));
|
|
38
38
|
exports.create = createOp;
|
|
39
39
|
const updateOp = __importStar(require("./update.operation"));
|
|
@@ -44,6 +44,16 @@ const getOp = __importStar(require("./get.operation"));
|
|
|
44
44
|
exports.get = getOp;
|
|
45
45
|
const getAllOp = __importStar(require("./getAll.operation"));
|
|
46
46
|
exports.getAll = getAllOp;
|
|
47
|
+
const createServiceOp = __importStar(require("./createService.operation"));
|
|
48
|
+
exports.createService = createServiceOp;
|
|
49
|
+
const updateServiceOp = __importStar(require("./updateService.operation"));
|
|
50
|
+
exports.updateService = updateServiceOp;
|
|
51
|
+
const deleteServiceOp = __importStar(require("./deleteService.operation"));
|
|
52
|
+
exports.deleteService = deleteServiceOp;
|
|
53
|
+
const getServiceOp = __importStar(require("./getService.operation"));
|
|
54
|
+
exports.getService = getServiceOp;
|
|
55
|
+
const getAllServicesOp = __importStar(require("./getAllServices.operation"));
|
|
56
|
+
exports.getAllServices = getAllServicesOp;
|
|
47
57
|
exports.description = [
|
|
48
58
|
{
|
|
49
59
|
displayName: 'Operation',
|
|
@@ -62,12 +72,24 @@ exports.description = [
|
|
|
62
72
|
description: 'Create a new vendor',
|
|
63
73
|
action: 'Create a vendor',
|
|
64
74
|
},
|
|
75
|
+
{
|
|
76
|
+
name: 'Create Service',
|
|
77
|
+
value: 'createService',
|
|
78
|
+
description: 'Create a new vendor service',
|
|
79
|
+
action: 'Create a vendor service',
|
|
80
|
+
},
|
|
65
81
|
{
|
|
66
82
|
name: 'Delete',
|
|
67
83
|
value: 'delete',
|
|
68
84
|
description: 'Delete a vendor',
|
|
69
85
|
action: 'Delete a vendor',
|
|
70
86
|
},
|
|
87
|
+
{
|
|
88
|
+
name: 'Delete Service',
|
|
89
|
+
value: 'deleteService',
|
|
90
|
+
description: 'Delete a vendor service',
|
|
91
|
+
action: 'Delete a vendor service',
|
|
92
|
+
},
|
|
71
93
|
{
|
|
72
94
|
name: 'Get',
|
|
73
95
|
value: 'get',
|
|
@@ -80,12 +102,30 @@ exports.description = [
|
|
|
80
102
|
description: 'Get many vendors',
|
|
81
103
|
action: 'Get many vendors',
|
|
82
104
|
},
|
|
105
|
+
{
|
|
106
|
+
name: 'Get Many Services',
|
|
107
|
+
value: 'getAllServices',
|
|
108
|
+
description: 'Get many vendor services',
|
|
109
|
+
action: 'Get many vendor services',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'Get Service',
|
|
113
|
+
value: 'getService',
|
|
114
|
+
description: 'Get a vendor service',
|
|
115
|
+
action: 'Get a vendor service',
|
|
116
|
+
},
|
|
83
117
|
{
|
|
84
118
|
name: 'Update',
|
|
85
119
|
value: 'update',
|
|
86
120
|
description: 'Update an existing vendor',
|
|
87
121
|
action: 'Update a vendor',
|
|
88
122
|
},
|
|
123
|
+
{
|
|
124
|
+
name: 'Update Service',
|
|
125
|
+
value: 'updateService',
|
|
126
|
+
description: 'Update an existing vendor service',
|
|
127
|
+
action: 'Update a vendor service',
|
|
128
|
+
},
|
|
89
129
|
],
|
|
90
130
|
default: 'create',
|
|
91
131
|
},
|
|
@@ -94,5 +134,10 @@ exports.description = [
|
|
|
94
134
|
...deleteOp.description,
|
|
95
135
|
...getOp.description,
|
|
96
136
|
...getAllOp.description,
|
|
137
|
+
...createServiceOp.description,
|
|
138
|
+
...updateServiceOp.description,
|
|
139
|
+
...deleteServiceOp.description,
|
|
140
|
+
...getServiceOp.description,
|
|
141
|
+
...getAllServicesOp.description,
|
|
97
142
|
];
|
|
98
143
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/vendor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6DAA+C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/vendor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6DAA+C;AAmGlC,0BAAM;AAlGnB,6DAA+C;AAmGlC,0BAAM;AAlGnB,6DAA+C;AAmGlC,0BAAM;AAlGnB,uDAAyC;AAmG/B,oBAAG;AAlGb,6DAA+C;AAmGlC,0BAAM;AAlGnB,2EAA6D;AAmGzC,wCAAa;AAlGjC,2EAA6D;AAmGzC,wCAAa;AAlGjC,2EAA6D;AAmGzC,wCAAa;AAlGjC,qEAAuD;AAmGtC,kCAAU;AAlG3B,6EAA+D;AA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Q;gBACf,WAAW,EAAE,2BAA2B;gBACxC,MAAM,EAAE,iBAAiB;aACzB;YACD;gBACC,IAAI,EAAE,gBAAgB;gBACtB,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,mCAAmC;gBAChD,MAAM,EAAE,yBAAyB;aACjC;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;IACD,GAAG,QAAQ,CAAC,WAAW;IACvB,GAAG,QAAQ,CAAC,WAAW;IACvB,GAAG,QAAQ,CAAC,WAAW;IACvB,GAAG,KAAK,CAAC,WAAW;IACpB,GAAG,QAAQ,CAAC,WAAW;IACvB,GAAG,eAAe,CAAC,WAAW;IAC9B,GAAG,eAAe,CAAC,WAAW;IAC9B,GAAG,eAAe,CAAC,WAAW;IAC9B,GAAG,YAAY,CAAC,WAAW;IAC3B,GAAG,gBAAgB,CAAC,WAAW;CAC/B,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Vendor Service ID',
|
|
9
|
+
name: 'vendorServiceId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['vendor'],
|
|
14
|
+
operation: ['updateService'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the vendor service to update',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Name',
|
|
23
|
+
name: 'name',
|
|
24
|
+
type: 'string',
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: {
|
|
27
|
+
resource: ['vendor'],
|
|
28
|
+
operation: ['updateService'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
default: '',
|
|
32
|
+
description: 'The name of the vendor service',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Description',
|
|
36
|
+
name: 'description',
|
|
37
|
+
type: 'string',
|
|
38
|
+
typeOptions: {
|
|
39
|
+
rows: 4,
|
|
40
|
+
},
|
|
41
|
+
displayOptions: {
|
|
42
|
+
show: {
|
|
43
|
+
resource: ['vendor'],
|
|
44
|
+
operation: ['updateService'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
default: '',
|
|
48
|
+
description: 'The description of the vendor service',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
async function execute(itemIndex) {
|
|
52
|
+
const vendorServiceId = this.getNodeParameter('vendorServiceId', itemIndex);
|
|
53
|
+
const name = this.getNodeParameter('name', itemIndex, '');
|
|
54
|
+
const description = this.getNodeParameter('description', itemIndex, '');
|
|
55
|
+
const query = `
|
|
56
|
+
mutation UpdateVendorService($input: UpdateVendorServiceInput!) {
|
|
57
|
+
updateVendorService(input: $input) {
|
|
58
|
+
vendorService {
|
|
59
|
+
id
|
|
60
|
+
name
|
|
61
|
+
description
|
|
62
|
+
createdAt
|
|
63
|
+
updatedAt
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
const input = { id: vendorServiceId };
|
|
69
|
+
if (name)
|
|
70
|
+
input.name = name;
|
|
71
|
+
if (description !== undefined)
|
|
72
|
+
input.description = description === '' ? null : description;
|
|
73
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
|
|
74
|
+
return {
|
|
75
|
+
json: responseData,
|
|
76
|
+
pairedItem: { item: itemIndex },
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=updateService.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateService.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/vendor/updateService.operation.ts"],"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