@limetech/n8n-nodes-lime 2.6.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/credentials/index.ts +0 -1
- package/dist/credentials/index.d.ts +0 -1
- package/dist/credentials/index.js +0 -1
- package/dist/credentials/index.js.map +1 -1
- package/dist/nodes/index.d.ts +0 -1
- package/dist/nodes/index.js +0 -1
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/lime-forms/LimeFormsTrigger.node.js +3 -3
- package/dist/nodes/lime-forms/LimeFormsTrigger.node.js.map +1 -1
- package/dist/nodes/lime-forms/assets/lime-crm.svg +1 -0
- package/dist/package.json +0 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/nodes/index.ts +0 -1
- package/nodes/lime-forms/LimeFormsTrigger.node.ts +3 -3
- package/nodes/lime-forms/assets/lime-crm.svg +1 -0
- package/package.json +1 -9
- package/credentials/FortnoxApi.credentials.ts +0 -61
- package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
- package/dist/credentials/FortnoxApi.credentials.js +0 -57
- package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
- package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
- package/dist/nodes/fortnox/Fortnox.node.js +0 -95
- package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
- package/dist/nodes/fortnox/Fortnox.node.json +0 -18
- package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
- package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
- package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
- package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
- package/dist/nodes/fortnox/commons.d.ts +0 -25
- package/dist/nodes/fortnox/commons.js +0 -44
- package/dist/nodes/fortnox/commons.js.map +0 -1
- package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
- package/dist/nodes/fortnox/index.d.ts +0 -6
- package/dist/nodes/fortnox/index.js +0 -23
- package/dist/nodes/fortnox/index.js.map +0 -1
- package/dist/nodes/fortnox/model.d.ts +0 -20
- package/dist/nodes/fortnox/model.js +0 -3
- package/dist/nodes/fortnox/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
- package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -7
- package/dist/nodes/fortnox/resources/customers/index.js +0 -85
- package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
- package/dist/nodes/fortnox/resources/customers/model.js +0 -3
- package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -281
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -9
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -38
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -38
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +0 -5
- package/dist/nodes/fortnox/resources/customers/operations/index.js +0 -42
- package/dist/nodes/fortnox/resources/customers/operations/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -261
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
- package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -7
- package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
- package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -147
- package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
- package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -37
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +0 -4
- package/dist/nodes/fortnox/resources/invoice/operations/index.js +0 -41
- package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -64
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
- package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
- package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
- package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
- package/dist/nodes/fortnox/transport/index.d.ts +0 -3
- package/dist/nodes/fortnox/transport/index.js +0 -76
- package/dist/nodes/fortnox/transport/index.js.map +0 -1
- package/dist/nodes/lime-forms/lime-forms.svg +0 -6
- package/nodes/fortnox/Fortnox.node.json +0 -18
- package/nodes/fortnox/Fortnox.node.ts +0 -102
- package/nodes/fortnox/FortnoxTrigger.node.json +0 -18
- package/nodes/fortnox/FortnoxTrigger.node.ts +0 -196
- package/nodes/fortnox/commons.ts +0 -94
- package/nodes/fortnox/fortnoxLogo.svg +0 -15
- package/nodes/fortnox/index.ts +0 -6
- package/nodes/fortnox/model.ts +0 -25
- package/nodes/fortnox/resources/customers/filterParameters.ts +0 -47
- package/nodes/fortnox/resources/customers/index.ts +0 -53
- package/nodes/fortnox/resources/customers/model.ts +0 -107
- package/nodes/fortnox/resources/customers/operations/create.operation.ts +0 -307
- package/nodes/fortnox/resources/customers/operations/delete.operation.ts +0 -49
- package/nodes/fortnox/resources/customers/operations/get.operation.ts +0 -50
- package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +0 -79
- package/nodes/fortnox/resources/customers/operations/index.ts +0 -5
- package/nodes/fortnox/resources/customers/operations/update.operation.ts +0 -288
- package/nodes/fortnox/resources/customers/sortParameters.ts +0 -32
- package/nodes/fortnox/resources/invoice/filterParameters.ts +0 -88
- package/nodes/fortnox/resources/invoice/index.ts +0 -49
- package/nodes/fortnox/resources/invoice/invoiceParameters.ts +0 -214
- package/nodes/fortnox/resources/invoice/model.ts +0 -156
- package/nodes/fortnox/resources/invoice/operations/create.operation.ts +0 -71
- package/nodes/fortnox/resources/invoice/operations/get.operation.ts +0 -50
- package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +0 -100
- package/nodes/fortnox/resources/invoice/operations/index.ts +0 -4
- package/nodes/fortnox/resources/invoice/operations/update.operation.ts +0 -79
- package/nodes/fortnox/transport/errorCodes.ts +0 -62
- package/nodes/fortnox/transport/index.ts +0 -106
- package/nodes/lime-forms/lime-forms.svg +0 -6
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.description = void 0;
|
|
4
|
-
exports.execute = execute;
|
|
5
|
-
const transport_1 = require("../../../transport");
|
|
6
|
-
exports.description = {
|
|
7
|
-
name: 'Get Customer',
|
|
8
|
-
value: 'get',
|
|
9
|
-
description: 'Get a single company by customer number',
|
|
10
|
-
action: 'Get a customer',
|
|
11
|
-
};
|
|
12
|
-
exports.properties = [
|
|
13
|
-
{
|
|
14
|
-
displayName: 'Customer Number',
|
|
15
|
-
name: 'customerNumber',
|
|
16
|
-
type: 'string',
|
|
17
|
-
required: true,
|
|
18
|
-
default: '',
|
|
19
|
-
description: 'Unique identifier for customer',
|
|
20
|
-
displayOptions: {
|
|
21
|
-
show: {
|
|
22
|
-
resource: ['customer'],
|
|
23
|
-
operation: ['get'],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
async function execute(i) {
|
|
29
|
-
const customerNumber = this.getNodeParameter('customerNumber', i, '');
|
|
30
|
-
const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
|
|
31
|
-
return await (0, transport_1.apiRequest)(this, {
|
|
32
|
-
method: 'GET',
|
|
33
|
-
endpoint,
|
|
34
|
-
}, {
|
|
35
|
-
id: customerNumber,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=get.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/get.operation.ts"],"names":[],"mappings":";;;AA4BA,0BAqBC;AAhDD,kDAAgD;AAGnC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,yCAAyC;IACtD,MAAM,EAAE,gBAAgB;CAC3B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,KAAK,CAAC;aACrB;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAEzB,CAAS;IAET,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACxC,gBAAgB,EAChB,CAAC,EACD,EAAE,CACK,CAAC;IAEZ,MAAM,QAAQ,GAAG,cAAc,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;IACpE,OAAO,MAAM,IAAA,sBAAU,EACnB,IAAI,EACJ;QACI,MAAM,EAAE,KAAK;QACb,QAAQ;KACX,EACD;QACI,EAAE,EAAE,cAAc;KACrB,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import { CustomersResponse } from '../model';
|
|
3
|
-
export declare const description: {
|
|
4
|
-
name: string;
|
|
5
|
-
value: string;
|
|
6
|
-
description: string;
|
|
7
|
-
action: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const properties: INodeProperties[];
|
|
10
|
-
export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomersResponse>;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.description = void 0;
|
|
4
|
-
exports.execute = execute;
|
|
5
|
-
const transport_1 = require("../../../transport");
|
|
6
|
-
const filterParameters_1 = require("../filterParameters");
|
|
7
|
-
const sortParameters_1 = require("../sortParameters");
|
|
8
|
-
exports.description = {
|
|
9
|
-
name: 'Get All Customers',
|
|
10
|
-
value: 'getAll',
|
|
11
|
-
description: 'Get all customers',
|
|
12
|
-
action: 'Get all customers',
|
|
13
|
-
};
|
|
14
|
-
exports.properties = [
|
|
15
|
-
{
|
|
16
|
-
displayName: 'Filter by',
|
|
17
|
-
name: 'filterParameters',
|
|
18
|
-
type: 'collection',
|
|
19
|
-
placeholder: 'Add Parameter',
|
|
20
|
-
default: {},
|
|
21
|
-
displayOptions: {
|
|
22
|
-
show: {
|
|
23
|
-
resource: ['customer'],
|
|
24
|
-
operation: ['getAll'],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
options: filterParameters_1.filterParameters,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
displayName: 'Sort by',
|
|
31
|
-
name: 'sortParameters',
|
|
32
|
-
type: 'collection',
|
|
33
|
-
placeholder: 'Add Parameter',
|
|
34
|
-
default: {},
|
|
35
|
-
displayOptions: {
|
|
36
|
-
show: {
|
|
37
|
-
resource: ['customer'],
|
|
38
|
-
operation: ['getAll'],
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
options: sortParameters_1.sortParameters,
|
|
42
|
-
},
|
|
43
|
-
];
|
|
44
|
-
async function execute(i) {
|
|
45
|
-
const filterParameters = this.getNodeParameter('filterParameters', i, {});
|
|
46
|
-
const sortParameters = this.getNodeParameter('sortParameters', i, {});
|
|
47
|
-
const qs = {};
|
|
48
|
-
if (filterParameters) {
|
|
49
|
-
for (const [key, value] of Object.entries(filterParameters)) {
|
|
50
|
-
if (value !== '' && value !== undefined && value !== null) {
|
|
51
|
-
qs[key] = value;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (sortParameters && Object.keys(sortParameters).length > 0) {
|
|
56
|
-
qs['sortby'] = Object.entries(sortParameters)
|
|
57
|
-
.filter(([, value]) => value)
|
|
58
|
-
.map(([, value]) => `${value}`)
|
|
59
|
-
.join('');
|
|
60
|
-
}
|
|
61
|
-
const endpoint = `/customers`;
|
|
62
|
-
return await (0, transport_1.apiRequest)(this, {
|
|
63
|
-
method: 'GET',
|
|
64
|
-
endpoint: endpoint,
|
|
65
|
-
qs: qs,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=getAll.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/getAll.operation.ts"],"names":[],"mappings":";;;AA4CA,0BAkCC;AA7ED,kDAAgD;AAChD,0DAAuD;AACvD,sDAAmD;AAGtC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,mBAAmB;IAChC,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,OAAO,EAAE,mCAAgB;KAC5B;IACD;QACI,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EA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9B,OAAO,MAAM,IAAA,sBAAU,EAAoB,IAAI,EAAE;QAC7C,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,QAAQ;QAClB,EAAE,EAAE,EAAE;KACT,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * as createSingleCustomer from './create.operation';
|
|
2
|
-
export * as deleteSingleCustomer from './delete.operation';
|
|
3
|
-
export * as getSingleCustomer from './get.operation';
|
|
4
|
-
export * as getManyCustomers from './getAll.operation';
|
|
5
|
-
export * as updateSingleCustomer from './update.operation';
|
|
@@ -1,42 +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 () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.updateSingleCustomer = exports.getManyCustomers = exports.getSingleCustomer = exports.deleteSingleCustomer = exports.createSingleCustomer = void 0;
|
|
37
|
-
exports.createSingleCustomer = __importStar(require("./create.operation"));
|
|
38
|
-
exports.deleteSingleCustomer = __importStar(require("./delete.operation"));
|
|
39
|
-
exports.getSingleCustomer = __importStar(require("./get.operation"));
|
|
40
|
-
exports.getManyCustomers = __importStar(require("./getAll.operation"));
|
|
41
|
-
exports.updateSingleCustomer = __importStar(require("./update.operation"));
|
|
42
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAA2D;AAC3D,2EAA2D;AAC3D,qEAAqD;AACrD,uEAAuD;AACvD,2EAA2D"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import { CustomerResponse } from '../model';
|
|
3
|
-
export declare const description: {
|
|
4
|
-
name: string;
|
|
5
|
-
value: string;
|
|
6
|
-
description: string;
|
|
7
|
-
action: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const properties: INodeProperties[];
|
|
10
|
-
export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomerResponse>;
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.properties = exports.description = void 0;
|
|
4
|
-
exports.execute = execute;
|
|
5
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
-
const transport_1 = require("../../../transport");
|
|
7
|
-
const currency_codes_1 = require("currency-codes");
|
|
8
|
-
exports.description = {
|
|
9
|
-
name: 'Update Customer',
|
|
10
|
-
value: 'update',
|
|
11
|
-
description: 'Update an existing customer',
|
|
12
|
-
action: 'Update a customer',
|
|
13
|
-
};
|
|
14
|
-
const updateProperties = [
|
|
15
|
-
{
|
|
16
|
-
displayName: 'Name',
|
|
17
|
-
name: 'Name',
|
|
18
|
-
type: 'string',
|
|
19
|
-
default: '',
|
|
20
|
-
description: 'Customer name',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
displayName: 'Active',
|
|
24
|
-
name: 'Active',
|
|
25
|
-
type: 'boolean',
|
|
26
|
-
default: true,
|
|
27
|
-
description: 'Whether the customer is active',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
displayName: 'Address 1',
|
|
31
|
-
name: 'Address1',
|
|
32
|
-
type: 'string',
|
|
33
|
-
default: '',
|
|
34
|
-
description: "Customer's primary address",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
displayName: 'Address 2',
|
|
38
|
-
name: 'Address2',
|
|
39
|
-
type: 'string',
|
|
40
|
-
default: '',
|
|
41
|
-
description: "Customer's secondary address",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
displayName: 'City',
|
|
45
|
-
name: 'City',
|
|
46
|
-
type: 'string',
|
|
47
|
-
default: '',
|
|
48
|
-
description: "Customer's city",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
displayName: 'Comments',
|
|
52
|
-
name: 'Comments',
|
|
53
|
-
type: 'string',
|
|
54
|
-
default: '',
|
|
55
|
-
description: 'Comments about the customer',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
displayName: 'Currency',
|
|
59
|
-
name: 'Currency',
|
|
60
|
-
type: 'string',
|
|
61
|
-
default: '',
|
|
62
|
-
description: "Customer's currency code, e.g., SEK, EUR",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
displayName: 'Cost Center',
|
|
66
|
-
name: 'CostCenter',
|
|
67
|
-
type: 'string',
|
|
68
|
-
default: '',
|
|
69
|
-
description: "Customer's cost center",
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
displayName: 'Country',
|
|
73
|
-
name: 'Country',
|
|
74
|
-
type: 'string',
|
|
75
|
-
default: '',
|
|
76
|
-
description: "Customer's country",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
displayName: 'Country Code',
|
|
80
|
-
name: 'CountryCode',
|
|
81
|
-
type: 'string',
|
|
82
|
-
default: '',
|
|
83
|
-
description: "Customer's country code",
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
displayName: 'Email',
|
|
87
|
-
name: 'Email',
|
|
88
|
-
type: 'string',
|
|
89
|
-
default: '',
|
|
90
|
-
description: "Customer's email address",
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
displayName: 'External Reference',
|
|
94
|
-
name: 'ExternalReference',
|
|
95
|
-
type: 'string',
|
|
96
|
-
default: '',
|
|
97
|
-
description: 'External reference for the customer',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
displayName: 'Fax',
|
|
101
|
-
name: 'Fax',
|
|
102
|
-
type: 'string',
|
|
103
|
-
default: '',
|
|
104
|
-
description: "Customer's fax number",
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
displayName: 'GLN',
|
|
108
|
-
name: 'GLN',
|
|
109
|
-
type: 'string',
|
|
110
|
-
default: '',
|
|
111
|
-
description: 'Global Location Number',
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
displayName: 'Organisation Number',
|
|
115
|
-
name: 'OrganisationNumber',
|
|
116
|
-
type: 'string',
|
|
117
|
-
default: '',
|
|
118
|
-
description: "Customer's organisation number",
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
displayName: 'Phone 1',
|
|
122
|
-
name: 'Phone1',
|
|
123
|
-
type: 'string',
|
|
124
|
-
default: '',
|
|
125
|
-
description: "Customer's primary phone number",
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
displayName: 'Phone 2',
|
|
129
|
-
name: 'Phone2',
|
|
130
|
-
type: 'string',
|
|
131
|
-
default: '',
|
|
132
|
-
description: "Customer's secondary phone number",
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
displayName: 'Type',
|
|
136
|
-
name: 'Type',
|
|
137
|
-
type: 'options',
|
|
138
|
-
options: [
|
|
139
|
-
{
|
|
140
|
-
name: 'Private',
|
|
141
|
-
value: 'PRIVATE',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
name: 'Company',
|
|
145
|
-
value: 'COMPANY',
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
default: 'COMPANY',
|
|
149
|
-
description: 'Type of customer',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
displayName: 'VAT Number',
|
|
153
|
-
name: 'VATNumber',
|
|
154
|
-
type: 'string',
|
|
155
|
-
default: '',
|
|
156
|
-
description: "Customer's VAT number",
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
displayName: 'VAT Type',
|
|
160
|
-
name: 'VATType',
|
|
161
|
-
type: 'options',
|
|
162
|
-
options: [
|
|
163
|
-
{
|
|
164
|
-
name: 'SE VAT',
|
|
165
|
-
value: 'SEVAT',
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
name: 'SE Reversed VAT',
|
|
169
|
-
value: 'SEREVERSEDVAT',
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
name: 'EU Reversed VAT',
|
|
173
|
-
value: 'EUREVERSEDVAT',
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
name: 'EU VAT',
|
|
177
|
-
value: 'EUVAT',
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
name: 'Export',
|
|
181
|
-
value: 'EXPORT',
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
default: 'SEVAT',
|
|
185
|
-
description: 'Type of VAT applied',
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
displayName: 'Website',
|
|
189
|
-
name: 'WWW',
|
|
190
|
-
type: 'string',
|
|
191
|
-
default: '',
|
|
192
|
-
description: "Customer's website URL",
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
displayName: 'ZIP Code',
|
|
196
|
-
name: 'ZipCode',
|
|
197
|
-
type: 'string',
|
|
198
|
-
default: '',
|
|
199
|
-
description: "Customer's ZIP/postal code",
|
|
200
|
-
},
|
|
201
|
-
];
|
|
202
|
-
exports.properties = [
|
|
203
|
-
{
|
|
204
|
-
displayName: 'Customer Number',
|
|
205
|
-
name: 'customerNumber',
|
|
206
|
-
type: 'string',
|
|
207
|
-
required: true,
|
|
208
|
-
default: '',
|
|
209
|
-
description: 'Unique identifier for customer',
|
|
210
|
-
displayOptions: {
|
|
211
|
-
show: {
|
|
212
|
-
resource: ['customer'],
|
|
213
|
-
operation: ['update'],
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
displayName: 'Fields',
|
|
219
|
-
name: 'fields',
|
|
220
|
-
type: 'collection',
|
|
221
|
-
placeholder: 'Add Field',
|
|
222
|
-
default: {},
|
|
223
|
-
displayOptions: {
|
|
224
|
-
show: {
|
|
225
|
-
resource: ['customer'],
|
|
226
|
-
operation: ['update'],
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
options: [...updateProperties],
|
|
230
|
-
},
|
|
231
|
-
];
|
|
232
|
-
async function execute(i) {
|
|
233
|
-
const customerNumber = this.getNodeParameter('customerNumber', i);
|
|
234
|
-
const fields = this.getNodeParameter('fields', i, {});
|
|
235
|
-
if (Object.keys(fields).length === 0) {
|
|
236
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one field must be provided for update');
|
|
237
|
-
}
|
|
238
|
-
if (fields.name && fields.name === '') {
|
|
239
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Customer name cannot be empty');
|
|
240
|
-
}
|
|
241
|
-
if (fields.Currency) {
|
|
242
|
-
fields.Currency = String(fields.Currency).toUpperCase();
|
|
243
|
-
if ((0, currency_codes_1.code)(fields.Currency) === undefined) {
|
|
244
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid currency code: ${fields.Currency}. Use ISO 4217 currency code.`);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
const body = {
|
|
248
|
-
Customer: {
|
|
249
|
-
...fields,
|
|
250
|
-
},
|
|
251
|
-
};
|
|
252
|
-
const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
|
|
253
|
-
return await (0, transport_1.apiRequest)(this, {
|
|
254
|
-
method: 'PUT',
|
|
255
|
-
endpoint: endpoint,
|
|
256
|
-
body: body,
|
|
257
|
-
}, {
|
|
258
|
-
id: customerNumber,
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
//# sourceMappingURL=update.operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/update.operation.ts"],"names":[],"mappings":";;;AA6OA,0BAkDC;AA/RD,+CAKsB;AACtB,kDAAgD;AAEhD,mDAAsD;AAEzC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,6BAA6B;IAC1C,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEF,MAAM,gBAAgB,GAAsB;IACxC;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAA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C,EAAE,CAAC;IAEpE,OAAO,MAAM,IAAA,sBAAU,EACnB,IAAI,EACJ;QACI,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;KACb,EACD;QACI,EAAE,EAAE,cAAc;KACrB,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sortParameters = void 0;
|
|
4
|
-
const sortByDefinitions = [
|
|
5
|
-
['Customer Number', 'customernumber'],
|
|
6
|
-
['Name', 'name'],
|
|
7
|
-
];
|
|
8
|
-
function createSortProperties(parameters) {
|
|
9
|
-
const options = parameters.map(([displayName, fieldName]) => {
|
|
10
|
-
return {
|
|
11
|
-
name: displayName,
|
|
12
|
-
value: fieldName,
|
|
13
|
-
description: `Sort by ${displayName.toLowerCase()}`,
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
return [
|
|
17
|
-
{
|
|
18
|
-
displayName: 'Sort by',
|
|
19
|
-
name: 'sortby',
|
|
20
|
-
type: 'options',
|
|
21
|
-
noDataExpression: true,
|
|
22
|
-
options: options,
|
|
23
|
-
default: options[0].value,
|
|
24
|
-
placeholder: 'Select a field to sort by',
|
|
25
|
-
description: 'Select a field to sort by',
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
|
-
exports.sortParameters = createSortProperties(sortByDefinitions);
|
|
30
|
-
//# sourceMappingURL=sortParameters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sortParameters.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/sortParameters.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACtB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;IACrC,CAAC,MAAM,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,SAAS,oBAAoB,CAAC,UAAsB;IAChD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE;QACxD,OAAO;YACH,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,WAAW,WAAW,CAAC,WAAW,EAAE,EAAE;SACtD,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,OAAO;QACH;YACI,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,SAA8B;YACpC,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK;YACzB,WAAW,EAAE,2BAA2B;YACxC,WAAW,EAAE,2BAA2B;SAC3C;KACJ,CAAC;AACN,CAAC;AAEY,QAAA,cAAc,GACvB,oBAAoB,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterParameters = void 0;
|
|
4
|
-
const commons_1 = require("../../commons");
|
|
5
|
-
const optionParametersDefinitions = [
|
|
6
|
-
{
|
|
7
|
-
displayName: 'Invoice Status',
|
|
8
|
-
name: 'filter',
|
|
9
|
-
parameters: [
|
|
10
|
-
['Cancelled', 'cancelled'],
|
|
11
|
-
['Fully Paid', 'fullypaid'],
|
|
12
|
-
['Unbooked', 'unbooked'],
|
|
13
|
-
['Unpaid', 'unpaid'],
|
|
14
|
-
['Unpaid And Overdue', 'unpaidoverdue'],
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
displayName: 'Invoice Type',
|
|
19
|
-
name: 'InvoiceType',
|
|
20
|
-
parameters: [
|
|
21
|
-
['Invoice', 'invoice'],
|
|
22
|
-
['Agreement Invoice', 'agreementinvoice'],
|
|
23
|
-
['Intrest Invoice', 'intrestinvoice'],
|
|
24
|
-
['Summery Invoice', 'summaryinvoice'],
|
|
25
|
-
['Cash Invoice', 'cashinvoice'],
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
const parametersDefinitions = [
|
|
30
|
-
['Account Number From', 'accountnumberfrom', 'string', '', {}],
|
|
31
|
-
['Account Number To', 'accountnumberto', 'string', '', {}],
|
|
32
|
-
['Article Description', 'articledescription', 'string', '', {}],
|
|
33
|
-
['Article Number', 'articlenumber', 'string', '', {}],
|
|
34
|
-
['Cost Center', 'costcenter', 'string', '', {}],
|
|
35
|
-
['Credit', 'credit', 'string', '', {}],
|
|
36
|
-
['Currency', 'currency', 'string', '', {}],
|
|
37
|
-
['Customer Name', 'customername', 'string', '', {}],
|
|
38
|
-
['Customer Number', 'customernumber', 'string', '', {}],
|
|
39
|
-
['Document Number', 'documentnumber', 'string', '', {}],
|
|
40
|
-
[
|
|
41
|
-
'External Invoice Reference 1',
|
|
42
|
-
'externalinvoicereference1',
|
|
43
|
-
'string',
|
|
44
|
-
'',
|
|
45
|
-
{},
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
'External Invoice Reference 2',
|
|
49
|
-
'externalinvoicereference2',
|
|
50
|
-
'string',
|
|
51
|
-
'',
|
|
52
|
-
{},
|
|
53
|
-
],
|
|
54
|
-
['From Date', 'fromdate', 'string', '', {}],
|
|
55
|
-
['From Final Pay Date', 'fromfinalpaydate', 'string', '', {}],
|
|
56
|
-
['Label', 'label', 'string', '', {}],
|
|
57
|
-
['Last Modified', 'lastmodified', 'string', '', {}],
|
|
58
|
-
['Not Completed', 'notcomplete', 'string', '', {}],
|
|
59
|
-
['OCR', 'ocr', 'string', '', {}],
|
|
60
|
-
['Our Reference', 'ourreference', 'string', '', {}],
|
|
61
|
-
['Project', 'project', 'string', '', {}],
|
|
62
|
-
['Sent', 'sent', 'boolean', false, {}],
|
|
63
|
-
['To Date', 'todate', 'string', '', {}],
|
|
64
|
-
['To Final Pay Date', 'tofinalpaydate', 'string', '', {}],
|
|
65
|
-
['Your Order Number', 'yourordernumber', 'string', '', {}],
|
|
66
|
-
['Your Reference', 'yourreference', 'string', '', {}],
|
|
67
|
-
];
|
|
68
|
-
exports.filterParameters = [
|
|
69
|
-
...optionParametersDefinitions.map((option) => (0, commons_1.createOptionParameter)(option)),
|
|
70
|
-
...parametersDefinitions.map(([displayName, name, filterType, defaultValue, typeOptions]) => (0, commons_1.createParameter)(displayName, name, filterType, defaultValue, typeOptions)),
|
|
71
|
-
];
|
|
72
|
-
//# sourceMappingURL=filterParameters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterParameters.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/invoice/filterParameters.ts"],"names":[],"mappings":";;;AACA,2CAKuB;AAEvB,MAAM,2BAA2B,GAAgC;IAC7D;QACI,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,CAAC,WAAW,EAAE,WAAW,CAAC;YAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;YAC3B,CAAC,UAAU,EAAE,UAAU,CAAC;YACxB,CAAC,QAAQ,EAAE,QAAQ,CAAC;YACpB,CAAC,oBAAoB,EAAE,eAAe,CAAC;SAC1C;KACJ;IACD;QACI,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE;YACR,CAAC,SAAS,EAAE,SAAS,CAAC;YACtB,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;YACzC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;YACrC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;YACrC,CAAC,cAAc,EAAE,aAAa,CAAC;SAClC;KACJ;CACJ,CAAC;AAEF,MAAM,qBAAqB,GAA0B;IACjD,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IAC9D,CAAC,mBAAmB,EAAE,iBAAi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AE,EAAE,EAAE,CAAC;IAChC,CAAC,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACnD,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACxC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC;IACtC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACvC,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACzD,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IAC1D,CAAC,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;CACxD,CAAC;AAEW,QAAA,gBAAgB,GAAsB;IAC/C,GAAG,2BAA2B,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC1C,IAAA,+BAAqB,EAAC,MAAM,CAAC,CAChC;IACD,GAAG,qBAAqB,CAAC,GAAG,CACxB,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,EAAE,EAAE,CAC3D,IAAA,yBAAe,EACX,WAAW,EACX,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,WAAW,CACd,CACR;CACJ,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
export declare const invoiceProperties: INodeProperties[];
|
|
3
|
-
export declare function invoiceOperations(this: IExecuteFunctions, { operation, i }: {
|
|
4
|
-
operation: string;
|
|
5
|
-
i: number;
|
|
6
|
-
}): Promise<import("./model").CreateInvoiceResponse | import("./model").GetInvoiceResponse | import("./model").GetAllInvoicesResponse | null>;
|
|
7
|
-
export * from './operations';
|