@agnocon/piece-bexio 0.1.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/LICENSE.MIT-AP +24 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +93 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/create-company.d.ts +28 -0
- package/dist/lib/actions/create-company.d.ts.map +1 -0
- package/dist/lib/actions/create-company.js +461 -0
- package/dist/lib/actions/create-company.js.map +1 -0
- package/dist/lib/actions/create-file.d.ts +4 -0
- package/dist/lib/actions/create-file.d.ts.map +1 -0
- package/dist/lib/actions/create-file.js +48 -0
- package/dist/lib/actions/create-file.js.map +1 -0
- package/dist/lib/actions/create-manual-entry.d.ts +7 -0
- package/dist/lib/actions/create-manual-entry.d.ts.map +1 -0
- package/dist/lib/actions/create-manual-entry.js +426 -0
- package/dist/lib/actions/create-manual-entry.js.map +1 -0
- package/dist/lib/actions/create-person.d.ts +30 -0
- package/dist/lib/actions/create-person.d.ts.map +1 -0
- package/dist/lib/actions/create-person.js +477 -0
- package/dist/lib/actions/create-person.js.map +1 -0
- package/dist/lib/actions/create-product.d.ts +34 -0
- package/dist/lib/actions/create-product.d.ts.map +1 -0
- package/dist/lib/actions/create-product.js +527 -0
- package/dist/lib/actions/create-product.js.map +1 -0
- package/dist/lib/actions/create-project.d.ts +17 -0
- package/dist/lib/actions/create-project.d.ts.map +1 -0
- package/dist/lib/actions/create-project.js +316 -0
- package/dist/lib/actions/create-project.js.map +1 -0
- package/dist/lib/actions/create-sales-invoice.d.ts +25 -0
- package/dist/lib/actions/create-sales-invoice.d.ts.map +1 -0
- package/dist/lib/actions/create-sales-invoice.js +615 -0
- package/dist/lib/actions/create-sales-invoice.js.map +1 -0
- package/dist/lib/actions/create-sales-order.d.ts +25 -0
- package/dist/lib/actions/create-sales-order.d.ts.map +1 -0
- package/dist/lib/actions/create-sales-order.js +642 -0
- package/dist/lib/actions/create-sales-order.js.map +1 -0
- package/dist/lib/actions/create-sales-quote.d.ts +28 -0
- package/dist/lib/actions/create-sales-quote.d.ts.map +1 -0
- package/dist/lib/actions/create-sales-quote.js +666 -0
- package/dist/lib/actions/create-sales-quote.js.map +1 -0
- package/dist/lib/actions/create-time-tracking.d.ts +17 -0
- package/dist/lib/actions/create-time-tracking.d.ts.map +1 -0
- package/dist/lib/actions/create-time-tracking.js +380 -0
- package/dist/lib/actions/create-time-tracking.js.map +1 -0
- package/dist/lib/actions/export-invoice-pdf.d.ts +5 -0
- package/dist/lib/actions/export-invoice-pdf.d.ts.map +1 -0
- package/dist/lib/actions/export-invoice-pdf.js +94 -0
- package/dist/lib/actions/export-invoice-pdf.js.map +1 -0
- package/dist/lib/actions/find-account.d.ts +6 -0
- package/dist/lib/actions/find-account.d.ts.map +1 -0
- package/dist/lib/actions/find-account.js +107 -0
- package/dist/lib/actions/find-account.js.map +1 -0
- package/dist/lib/actions/find-company.d.ts +8 -0
- package/dist/lib/actions/find-company.d.ts.map +1 -0
- package/dist/lib/actions/find-company.js +160 -0
- package/dist/lib/actions/find-company.js.map +1 -0
- package/dist/lib/actions/find-country.d.ts +7 -0
- package/dist/lib/actions/find-country.d.ts.map +1 -0
- package/dist/lib/actions/find-country.js +125 -0
- package/dist/lib/actions/find-country.js.map +1 -0
- package/dist/lib/actions/find-person.d.ts +9 -0
- package/dist/lib/actions/find-person.d.ts.map +1 -0
- package/dist/lib/actions/find-person.js +175 -0
- package/dist/lib/actions/find-person.js.map +1 -0
- package/dist/lib/actions/find-product.d.ts +7 -0
- package/dist/lib/actions/find-product.d.ts.map +1 -0
- package/dist/lib/actions/find-product.js +124 -0
- package/dist/lib/actions/find-product.js.map +1 -0
- package/dist/lib/actions/search-invoice.d.ts +7 -0
- package/dist/lib/actions/search-invoice.d.ts.map +1 -0
- package/dist/lib/actions/search-invoice.js +140 -0
- package/dist/lib/actions/search-invoice.js.map +1 -0
- package/dist/lib/actions/search-order.d.ts +7 -0
- package/dist/lib/actions/search-order.d.ts.map +1 -0
- package/dist/lib/actions/search-order.js +139 -0
- package/dist/lib/actions/search-order.js.map +1 -0
- package/dist/lib/actions/search-quote.d.ts +7 -0
- package/dist/lib/actions/search-quote.d.ts.map +1 -0
- package/dist/lib/actions/search-quote.js +140 -0
- package/dist/lib/actions/search-quote.js.map +1 -0
- package/dist/lib/actions/send-sales-invoice.d.ts +9 -0
- package/dist/lib/actions/send-sales-invoice.d.ts.map +1 -0
- package/dist/lib/actions/send-sales-invoice.js +110 -0
- package/dist/lib/actions/send-sales-invoice.js.map +1 -0
- package/dist/lib/actions/update-company.d.ts +29 -0
- package/dist/lib/actions/update-company.d.ts.map +1 -0
- package/dist/lib/actions/update-company.js +506 -0
- package/dist/lib/actions/update-company.js.map +1 -0
- package/dist/lib/actions/update-person.d.ts +31 -0
- package/dist/lib/actions/update-person.d.ts.map +1 -0
- package/dist/lib/actions/update-person.js +524 -0
- package/dist/lib/actions/update-person.js.map +1 -0
- package/dist/lib/actions/update-product.d.ts +34 -0
- package/dist/lib/actions/update-product.d.ts.map +1 -0
- package/dist/lib/actions/update-product.js +556 -0
- package/dist/lib/actions/update-product.js.map +1 -0
- package/dist/lib/auth.d.ts +2 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +51 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/common/client.d.ts +13 -0
- package/dist/lib/common/client.d.ts.map +1 -0
- package/dist/lib/common/client.js +64 -0
- package/dist/lib/common/client.js.map +1 -0
- package/dist/lib/common/index.d.ts +5 -0
- package/dist/lib/common/index.d.ts.map +1 -0
- package/dist/lib/common/index.js +10 -0
- package/dist/lib/common/index.js.map +1 -0
- package/dist/lib/common/props.d.ts +14 -0
- package/dist/lib/common/props.d.ts.map +1 -0
- package/dist/lib/common/props.js +118 -0
- package/dist/lib/common/props.js.map +1 -0
- package/dist/lib/common/types.d.ts +89 -0
- package/dist/lib/common/types.d.ts.map +1 -0
- package/dist/lib/common/types.js +6 -0
- package/dist/lib/common/types.js.map +1 -0
- package/dist/lib/triggers/new-order.d.ts +11 -0
- package/dist/lib/triggers/new-order.d.ts.map +1 -0
- package/dist/lib/triggers/new-order.js +152 -0
- package/dist/lib/triggers/new-order.js.map +1 -0
- package/dist/lib/triggers/new-product.d.ts +3 -0
- package/dist/lib/triggers/new-product.d.ts.map +1 -0
- package/dist/lib/triggers/new-product.js +111 -0
- package/dist/lib/triggers/new-product.js.map +1 -0
- package/dist/lib/triggers/new-project.d.ts +11 -0
- package/dist/lib/triggers/new-project.d.ts.map +1 -0
- package/dist/lib/triggers/new-project.js +141 -0
- package/dist/lib/triggers/new-project.js.map +1 -0
- package/dist/lib/triggers/new-quote.d.ts +11 -0
- package/dist/lib/triggers/new-quote.d.ts.map +1 -0
- package/dist/lib/triggers/new-quote.js +153 -0
- package/dist/lib/triggers/new-quote.js.map +1 -0
- package/dist/lib/triggers/new-sales-invoice.d.ts +11 -0
- package/dist/lib/triggers/new-sales-invoice.d.ts.map +1 -0
- package/dist/lib/triggers/new-sales-invoice.js +153 -0
- package/dist/lib/triggers/new-sales-invoice.js.map +1 -0
- package/dist/lib/triggers/new-updated-company.d.ts +3 -0
- package/dist/lib/triggers/new-updated-company.d.ts.map +1 -0
- package/dist/lib/triggers/new-updated-company.js +122 -0
- package/dist/lib/triggers/new-updated-company.js.map +1 -0
- package/dist/lib/triggers/new-updated-person.d.ts +3 -0
- package/dist/lib/triggers/new-updated-person.d.ts.map +1 -0
- package/dist/lib/triggers/new-updated-person.js +122 -0
- package/dist/lib/triggers/new-updated-person.js.map +1 -0
- package/package.json +48 -0
- package/src/index.ts +89 -0
- package/src/lib/actions/create-company.ts +464 -0
- package/src/lib/actions/create-file.ts +62 -0
- package/src/lib/actions/create-manual-entry.ts +445 -0
- package/src/lib/actions/create-person.ts +481 -0
- package/src/lib/actions/create-product.ts +563 -0
- package/src/lib/actions/create-project.ts +344 -0
- package/src/lib/actions/create-sales-invoice.ts +656 -0
- package/src/lib/actions/create-sales-order.ts +689 -0
- package/src/lib/actions/create-sales-quote.ts +713 -0
- package/src/lib/actions/create-time-tracking.ts +418 -0
- package/src/lib/actions/export-invoice-pdf.ts +104 -0
- package/src/lib/actions/find-account.ts +114 -0
- package/src/lib/actions/find-company.ts +193 -0
- package/src/lib/actions/find-country.ts +127 -0
- package/src/lib/actions/find-person.ts +208 -0
- package/src/lib/actions/find-product.ts +161 -0
- package/src/lib/actions/search-invoice.ts +157 -0
- package/src/lib/actions/search-order.ts +155 -0
- package/src/lib/actions/search-quote.ts +157 -0
- package/src/lib/actions/send-sales-invoice.ts +118 -0
- package/src/lib/actions/update-company.ts +518 -0
- package/src/lib/actions/update-person.ts +536 -0
- package/src/lib/actions/update-product.ts +594 -0
- package/src/lib/auth.ts +44 -0
- package/src/lib/common/client.ts +65 -0
- package/src/lib/common/index.ts +5 -0
- package/src/lib/common/props.ts +127 -0
- package/src/lib/common/types.ts +99 -0
- package/src/lib/triggers/new-order.ts +184 -0
- package/src/lib/triggers/new-product.ts +154 -0
- package/src/lib/triggers/new-project.ts +165 -0
- package/src/lib/triggers/new-quote.ts +186 -0
- package/src/lib/triggers/new-sales-invoice.ts +186 -0
- package/src/lib/triggers/new-updated-company.ts +161 -0
- package/src/lib/triggers/new-updated-person.ts +161 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BexioClient = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bexio/src/lib/common/client.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
8
|
+
const index_1 = require("./index");
|
|
9
|
+
class BexioClient {
|
|
10
|
+
constructor(auth) {
|
|
11
|
+
this.auth = auth;
|
|
12
|
+
}
|
|
13
|
+
makeRequest(method, endpoint, data, queryParams) {
|
|
14
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
// If endpoint already includes version (starts with /2.0/ or /3.0/), use it directly
|
|
16
|
+
// Otherwise, prepend the default API version
|
|
17
|
+
const url = endpoint.startsWith('/2.0/') || endpoint.startsWith('/3.0/')
|
|
18
|
+
? `${index_1.bexioCommon.baseUrl}${endpoint}`
|
|
19
|
+
: `${index_1.bexioCommon.baseUrl}/${index_1.bexioCommon.api_version}${endpoint}`;
|
|
20
|
+
const request = {
|
|
21
|
+
method,
|
|
22
|
+
url,
|
|
23
|
+
authentication: {
|
|
24
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
25
|
+
token: this.auth.access_token,
|
|
26
|
+
},
|
|
27
|
+
headers: {
|
|
28
|
+
Accept: 'application/json',
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
if (data) {
|
|
33
|
+
request.body = data;
|
|
34
|
+
}
|
|
35
|
+
if (queryParams) {
|
|
36
|
+
request.queryParams = queryParams;
|
|
37
|
+
}
|
|
38
|
+
const response = yield pieces_common_1.httpClient.sendRequest(request);
|
|
39
|
+
return response.body;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
get(endpoint, queryParams) {
|
|
43
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return this.makeRequest(pieces_common_1.HttpMethod.GET, endpoint, undefined, queryParams);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
post(endpoint, data, queryParams) {
|
|
48
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
return this.makeRequest(pieces_common_1.HttpMethod.POST, endpoint, data, queryParams);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
patch(endpoint, data) {
|
|
53
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
return this.makeRequest(pieces_common_1.HttpMethod.PATCH, endpoint, data);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
delete(endpoint) {
|
|
58
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return this.makeRequest(pieces_common_1.HttpMethod.DELETE, endpoint);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.BexioClient = BexioClient;
|
|
64
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/lib/common/client.ts"],"names":[],"mappings":";;;;AAAA,6FAA6F;AAC7F,qEAAqE;AACrE,0DAKgC;AAChC,mCAAsC;AAEtC,MAAa,WAAW;IACtB,YAAoB,IAA4B;QAA5B,SAAI,GAAJ,IAAI,CAAwB;IAAG,CAAC;IAE9C,WAAW,CACf,MAAkB,EAClB,QAAgB,EAChB,IAAc,EACd,WAAoC;;YAEpC,qFAAqF;YACrF,6CAA6C;YAC7C,MAAM,GAAG,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;gBACtE,CAAC,CAAC,GAAG,mBAAW,CAAC,OAAO,GAAG,QAAQ,EAAE;gBACrC,CAAC,CAAC,GAAG,mBAAW,CAAC,OAAO,IAAI,mBAAW,CAAC,WAAW,GAAG,QAAQ,EAAE,CAAC;YAEnE,MAAM,OAAO,GAAgB;gBAC3B,MAAM;gBACN,GAAG;gBACH,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY;iBAC9B;gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBACnC;aACF,CAAC;YAEF,IAAI,IAAI,EAAE,CAAC;gBACT,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;YACtB,CAAC;YAED,IAAI,WAAW,EAAE,CAAC;gBAChB,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;YACpC,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAI,OAAO,CAAC,CAAC;YAC1D,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;IAEK,GAAG,CAAI,QAAgB,EAAE,WAAoC;;YACjE,OAAO,IAAI,CAAC,WAAW,CAAI,0BAAU,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;QAC/E,CAAC;KAAA;IAEK,IAAI,CAAI,QAAgB,EAAE,IAAa,EAAE,WAAoC;;YACjF,OAAO,IAAI,CAAC,WAAW,CAAI,0BAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QAC3E,CAAC;KAAA;IAEK,KAAK,CAAI,QAAgB,EAAE,IAAa;;YAC5C,OAAO,IAAI,CAAC,WAAW,CAAI,0BAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC;KAAA;IAEK,MAAM,CAAI,QAAgB;;YAC9B,OAAO,IAAI,CAAC,WAAW,CAAI,0BAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC1D,CAAC;KAAA;CACF;AAvDD,kCAuDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/common/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;CAGvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bexioCommon = void 0;
|
|
4
|
+
// Vendored from Activepieces packages/pieces/community/bexio/src/lib/common/index.ts (MIT).
|
|
5
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
6
|
+
exports.bexioCommon = {
|
|
7
|
+
baseUrl: 'https://api.bexio.com',
|
|
8
|
+
api_version: '3.0',
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/common/index.ts"],"names":[],"mappings":";;;AAAA,4FAA4F;AAC5F,qEAAqE;AACxD,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,uBAAuB;IAChC,WAAW,EAAE,KAAK;CACnB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const bexioCommonProps: {
|
|
2
|
+
account: (options: {
|
|
3
|
+
displayName: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
required: boolean;
|
|
6
|
+
}) => import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>> | import("@agnocon/pieces-framework").DropdownProperty<number, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
7
|
+
tax: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
8
|
+
currency: (options: {
|
|
9
|
+
displayName: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
}) => import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>> | import("@agnocon/pieces-framework").DropdownProperty<number, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/lib/common/props.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;uBACR;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,OAAO,CAAC;KACnB;;wBA0EmB;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,OAAO,CAAC;KACnB;CAqCF,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bexioCommonProps = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bexio/src/lib/common/props.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const client_1 = require("./client");
|
|
9
|
+
const auth_1 = require("../auth");
|
|
10
|
+
exports.bexioCommonProps = {
|
|
11
|
+
account: (options) => {
|
|
12
|
+
return pieces_framework_1.Property.Dropdown({
|
|
13
|
+
auth: auth_1.bexioAuth,
|
|
14
|
+
displayName: options.displayName,
|
|
15
|
+
description: options.description,
|
|
16
|
+
required: options.required,
|
|
17
|
+
refreshers: [],
|
|
18
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
19
|
+
if (!auth) {
|
|
20
|
+
return {
|
|
21
|
+
disabled: true,
|
|
22
|
+
placeholder: 'Connect your Bexio account first',
|
|
23
|
+
options: [],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const client = new client_1.BexioClient(auth);
|
|
28
|
+
const accounts = yield client.get('/accounts');
|
|
29
|
+
return {
|
|
30
|
+
disabled: false,
|
|
31
|
+
options: accounts.map((account) => ({
|
|
32
|
+
label: `${account.account_no} - ${account.name}`,
|
|
33
|
+
value: account.id,
|
|
34
|
+
})),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
return {
|
|
39
|
+
disabled: true,
|
|
40
|
+
placeholder: 'Failed to load accounts',
|
|
41
|
+
options: [],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
tax: pieces_framework_1.Property.Dropdown({
|
|
48
|
+
auth: auth_1.bexioAuth,
|
|
49
|
+
displayName: 'Tax',
|
|
50
|
+
description: 'Select a tax rate',
|
|
51
|
+
required: false,
|
|
52
|
+
refreshers: [],
|
|
53
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
54
|
+
if (!auth) {
|
|
55
|
+
return {
|
|
56
|
+
disabled: true,
|
|
57
|
+
placeholder: 'Connect your Bexio account first',
|
|
58
|
+
options: [],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
const client = new client_1.BexioClient(auth);
|
|
63
|
+
const taxes = yield client.get('/taxes');
|
|
64
|
+
return {
|
|
65
|
+
disabled: false,
|
|
66
|
+
options: taxes.map((tax) => ({
|
|
67
|
+
label: `${tax.name} (${tax.percentage}%)`,
|
|
68
|
+
value: tax.id,
|
|
69
|
+
})),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
return {
|
|
74
|
+
disabled: true,
|
|
75
|
+
placeholder: 'Failed to load taxes',
|
|
76
|
+
options: [],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}),
|
|
80
|
+
}),
|
|
81
|
+
currency: (options) => {
|
|
82
|
+
return pieces_framework_1.Property.Dropdown({
|
|
83
|
+
auth: auth_1.bexioAuth,
|
|
84
|
+
displayName: options.displayName,
|
|
85
|
+
description: options.description,
|
|
86
|
+
required: options.required,
|
|
87
|
+
refreshers: [],
|
|
88
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
89
|
+
if (!auth) {
|
|
90
|
+
return {
|
|
91
|
+
disabled: true,
|
|
92
|
+
placeholder: 'Connect your Bexio account first',
|
|
93
|
+
options: [],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
const client = new client_1.BexioClient(auth);
|
|
98
|
+
const currencies = yield client.get('/3.0/currencies');
|
|
99
|
+
return {
|
|
100
|
+
disabled: false,
|
|
101
|
+
options: currencies.map((currency) => ({
|
|
102
|
+
label: currency.name,
|
|
103
|
+
value: currency.id,
|
|
104
|
+
})),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
return {
|
|
109
|
+
disabled: true,
|
|
110
|
+
placeholder: 'Failed to load currencies',
|
|
111
|
+
options: [],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}),
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/lib/common/props.ts"],"names":[],"mappings":";;;;AAAA,4FAA4F;AAC5F,qEAAqE;AACrE,gEAA0E;AAC1E,qCAAuC;AAEvC,kCAAoC;AAEvB,QAAA,gBAAgB,GAAG;IAC9B,OAAO,EAAE,CAAC,OAIT,EAAE,EAAE;QACH,OAAO,2BAAQ,CAAC,QAAQ,CAAC;YACvB,IAAI,EAAE,gBAAS;YACf,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,kCAAkC;wB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AC;qBACJ,CAAC;gBACJ,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,2BAA2B;wBACxC,OAAO,EAAE,EAAE;qBACZ,CAAC;gBACJ,CAAC;YACH,CAAC,CAAA;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export interface BexioContact {
|
|
2
|
+
id: number;
|
|
3
|
+
nr: string;
|
|
4
|
+
contact_type_id: number;
|
|
5
|
+
name_1: string;
|
|
6
|
+
name_2?: string;
|
|
7
|
+
salutation_id?: number;
|
|
8
|
+
salutation_form?: number;
|
|
9
|
+
title_id?: number;
|
|
10
|
+
birthday?: string;
|
|
11
|
+
address?: string;
|
|
12
|
+
postcode?: string;
|
|
13
|
+
city?: string;
|
|
14
|
+
country_id?: number;
|
|
15
|
+
mail?: string;
|
|
16
|
+
mail_second?: string;
|
|
17
|
+
phone_fixed?: string;
|
|
18
|
+
phone_fixed_second?: string;
|
|
19
|
+
phone_mobile?: string;
|
|
20
|
+
fax?: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
skype_name?: string;
|
|
23
|
+
remarks?: string;
|
|
24
|
+
language_id?: number;
|
|
25
|
+
contact_group_ids?: string;
|
|
26
|
+
contact_branch_ids?: string;
|
|
27
|
+
user_id?: number;
|
|
28
|
+
owner_id?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface BexioCompany {
|
|
31
|
+
id: number;
|
|
32
|
+
name: string;
|
|
33
|
+
address?: string;
|
|
34
|
+
address_nr?: string;
|
|
35
|
+
postcode?: string;
|
|
36
|
+
city?: string;
|
|
37
|
+
country_id?: number;
|
|
38
|
+
legal_form?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface BexioAccount {
|
|
41
|
+
id: number;
|
|
42
|
+
account_no: string;
|
|
43
|
+
name: string;
|
|
44
|
+
account_type: number;
|
|
45
|
+
}
|
|
46
|
+
export interface BexioTax {
|
|
47
|
+
id: number;
|
|
48
|
+
name: string;
|
|
49
|
+
percentage: string;
|
|
50
|
+
}
|
|
51
|
+
export interface BexioCurrency {
|
|
52
|
+
id: number;
|
|
53
|
+
name: string;
|
|
54
|
+
}
|
|
55
|
+
export interface BexioManualEntry {
|
|
56
|
+
debit_account_id?: number;
|
|
57
|
+
credit_account_id?: number;
|
|
58
|
+
tax_id?: number;
|
|
59
|
+
tax_account_id?: number;
|
|
60
|
+
description?: string;
|
|
61
|
+
amount?: number;
|
|
62
|
+
currency_id?: number;
|
|
63
|
+
currency_factor?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface BexioManualEntryResponse {
|
|
66
|
+
id: number;
|
|
67
|
+
type: 'manual_single_entry' | 'manual_compound_entry' | 'manual_group_entry';
|
|
68
|
+
date: string;
|
|
69
|
+
reference_nr?: string;
|
|
70
|
+
created_by_user_id?: number;
|
|
71
|
+
edited_by_user_id?: number;
|
|
72
|
+
entries: BexioManualEntry[];
|
|
73
|
+
is_locked?: boolean;
|
|
74
|
+
locked_info?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface BexioError {
|
|
77
|
+
error_code: number;
|
|
78
|
+
message: string;
|
|
79
|
+
}
|
|
80
|
+
export interface BexioListResponse<T> {
|
|
81
|
+
data: T[];
|
|
82
|
+
paging?: {
|
|
83
|
+
page: number;
|
|
84
|
+
page_size: number;
|
|
85
|
+
page_count: number;
|
|
86
|
+
item_count: number;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/common/types.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CA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M,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Vendored from Activepieces packages/pieces/community/bexio/src/lib/common/types.ts (MIT).
|
|
3
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
4
|
+
// Common types for Bexio API
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/common/types.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,qEAAqE;AACrE,6BAA6B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@agnocon/pieces-framework';
|
|
2
|
+
export declare const newOrderTrigger: import("@agnocon/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
3
|
+
status_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
4
|
+
}> | import("@agnocon/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
5
|
+
status_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
6
|
+
}> | import("@agnocon/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
7
|
+
status_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
8
|
+
}> | import("@agnocon/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
|
|
9
|
+
status_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=new-order.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-order.d.ts","sourceRoot":"","sources":["../../../src/lib/triggers/new-order.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,eAAe,EAAqE,MAAM,2BAA2B,CAAC;AA2E9I,eAAO,MAAM,eAAe;;;;;;;;EA2G1B,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newOrderTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bexio/src/lib/triggers/new-order.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const auth_1 = require("../auth");
|
|
10
|
+
const client_1 = require("../common/client");
|
|
11
|
+
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
12
|
+
const polling = {
|
|
13
|
+
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
14
|
+
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastFetchEpochMS, propsValue }) {
|
|
15
|
+
const client = new client_1.BexioClient(auth);
|
|
16
|
+
const isTest = lastFetchEpochMS === 0;
|
|
17
|
+
const lastFetchDate = isTest
|
|
18
|
+
? (0, dayjs_1.default)().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss')
|
|
19
|
+
: (0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm:ss');
|
|
20
|
+
const searchBody = [
|
|
21
|
+
{
|
|
22
|
+
field: 'updated_at',
|
|
23
|
+
value: lastFetchDate,
|
|
24
|
+
criteria: '>=',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
if (propsValue.status_id !== undefined && propsValue.status_id !== null) {
|
|
28
|
+
searchBody.push({
|
|
29
|
+
field: 'kb_item_status_id',
|
|
30
|
+
value: propsValue.status_id.toString(),
|
|
31
|
+
criteria: '=',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const queryParams = {
|
|
35
|
+
order_by: 'updated_at_desc',
|
|
36
|
+
limit: isTest ? '5' : '500',
|
|
37
|
+
};
|
|
38
|
+
const orders = yield client.post('/2.0/kb_order/search', searchBody, queryParams);
|
|
39
|
+
return orders.map((order) => {
|
|
40
|
+
const updatedAt = order.updated_at || new Date().toISOString();
|
|
41
|
+
const epochMilliSeconds = (0, dayjs_1.default)(updatedAt).valueOf();
|
|
42
|
+
return {
|
|
43
|
+
epochMilliSeconds,
|
|
44
|
+
data: order,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
49
|
+
exports.newOrderTrigger = (0, pieces_framework_1.createTrigger)({
|
|
50
|
+
auth: auth_1.bexioAuth,
|
|
51
|
+
name: 'new_order',
|
|
52
|
+
displayName: 'New Order',
|
|
53
|
+
description: 'Triggers when an Order is created or updated with the chosen status',
|
|
54
|
+
aiMetadata: {
|
|
55
|
+
description: 'Fires when a sales order is created or its updated timestamp changes in Bexio, optionally filtered to a chosen order status. Emits each matching order with its document number, contact, totals (gross, net, taxes), valid-from date, and status. Use to react to new or modified orders.',
|
|
56
|
+
},
|
|
57
|
+
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
58
|
+
props: {
|
|
59
|
+
status_id: pieces_framework_1.Property.Dropdown({
|
|
60
|
+
auth: auth_1.bexioAuth,
|
|
61
|
+
displayName: 'Status',
|
|
62
|
+
description: 'Filter orders by status (leave empty to trigger for all statuses)',
|
|
63
|
+
required: false,
|
|
64
|
+
refreshers: [],
|
|
65
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
66
|
+
if (!auth) {
|
|
67
|
+
return {
|
|
68
|
+
disabled: true,
|
|
69
|
+
placeholder: 'Connect your Bexio account first',
|
|
70
|
+
options: [],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
const client = new client_1.BexioClient(auth);
|
|
75
|
+
const statuses = yield client.get('/2.0/kb_order_status').catch(() => []);
|
|
76
|
+
if (statuses.length === 0) {
|
|
77
|
+
return {
|
|
78
|
+
disabled: false,
|
|
79
|
+
placeholder: 'Status filter not available - will trigger for all statuses',
|
|
80
|
+
options: [],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
disabled: false,
|
|
85
|
+
options: statuses.map((status) => ({
|
|
86
|
+
label: status.name,
|
|
87
|
+
value: status.id,
|
|
88
|
+
})),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
return {
|
|
93
|
+
disabled: false,
|
|
94
|
+
placeholder: 'Enter status ID manually or leave empty for all statuses',
|
|
95
|
+
options: [],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}),
|
|
99
|
+
}),
|
|
100
|
+
},
|
|
101
|
+
sampleData: {
|
|
102
|
+
id: 4,
|
|
103
|
+
document_nr: 'AU-00001',
|
|
104
|
+
title: null,
|
|
105
|
+
contact_id: 14,
|
|
106
|
+
contact_sub_id: null,
|
|
107
|
+
user_id: 1,
|
|
108
|
+
project_id: null,
|
|
109
|
+
language_id: 1,
|
|
110
|
+
bank_account_id: 1,
|
|
111
|
+
currency_id: 1,
|
|
112
|
+
payment_type_id: 1,
|
|
113
|
+
total_gross: '17.800000',
|
|
114
|
+
total_net: '17.800000',
|
|
115
|
+
total_taxes: '1.3706',
|
|
116
|
+
total: '19.150000',
|
|
117
|
+
kb_item_status_id: 5,
|
|
118
|
+
is_valid_from: '2019-06-24',
|
|
119
|
+
updated_at: '2019-04-08 13:17:32',
|
|
120
|
+
},
|
|
121
|
+
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
122
|
+
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
123
|
+
auth: context.auth,
|
|
124
|
+
store: context.store,
|
|
125
|
+
propsValue: context.propsValue,
|
|
126
|
+
});
|
|
127
|
+
}),
|
|
128
|
+
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
129
|
+
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
130
|
+
auth: context.auth,
|
|
131
|
+
store: context.store,
|
|
132
|
+
propsValue: context.propsValue,
|
|
133
|
+
});
|
|
134
|
+
}),
|
|
135
|
+
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
136
|
+
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
137
|
+
auth: context.auth,
|
|
138
|
+
store: context.store,
|
|
139
|
+
propsValue: context.propsValue,
|
|
140
|
+
files: context.files,
|
|
141
|
+
});
|
|
142
|
+
}),
|
|
143
|
+
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
144
|
+
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
145
|
+
auth: context.auth,
|
|
146
|
+
store: context.store,
|
|
147
|
+
propsValue: context.propsValue,
|
|
148
|
+
files: context.files,
|
|
149
|
+
});
|
|
150
|
+
}),
|
|
151
|
+
});
|
|
152
|
+
//# sourceMappingURL=new-order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-order.js","sourceRoot":"","sources":["../../../src/lib/triggers/new-order.ts"],"names":[],"mappings":";;;;AAAA,kGAAkG;AAClG,qE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,EAAE,EAAE;QAC3B,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE;YACrC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B,CAAC,CAAC;IACL,CAAC,CAAA;IACD,IAAI,EAAE,CAAO,OAAO,EAAE,EAAE;QACtB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE;YACvC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC,CAAA;IACD,GAAG,EAAE,CAAO,OAAO,EAAE,EAAE;QACrB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE;YACvC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC,CAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@agnocon/pieces-framework';
|
|
2
|
+
export declare const newProductTrigger: import("@agnocon/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {}> | import("@agnocon/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {}> | import("@agnocon/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {}> | import("@agnocon/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {}>;
|
|
3
|
+
//# sourceMappingURL=new-product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-product.d.ts","sourceRoot":"","sources":["../../../src/lib/triggers/new-product.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,eAAe,EAAqC,MAAM,2BAA2B,CAAC;AAuE9G,eAAO,MAAM,iBAAiB,ssBAiF5B,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newProductTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/bexio/src/lib/triggers/new-product.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const auth_1 = require("../auth");
|
|
10
|
+
const client_1 = require("../common/client");
|
|
11
|
+
const polling = {
|
|
12
|
+
strategy: pieces_common_1.DedupeStrategy.LAST_ITEM,
|
|
13
|
+
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastItemId }) {
|
|
14
|
+
const client = new client_1.BexioClient(auth);
|
|
15
|
+
// Use GET endpoint to fetch all articles, then sort by ID descending
|
|
16
|
+
// This avoids the issue with empty search arrays
|
|
17
|
+
const queryParams = {
|
|
18
|
+
limit: '500',
|
|
19
|
+
};
|
|
20
|
+
const products = yield client.get('/2.0/article', queryParams);
|
|
21
|
+
// Sort by ID descending to get newest first (since GET doesn't support order_by)
|
|
22
|
+
const sortedProducts = products.sort((a, b) => b.id - a.id);
|
|
23
|
+
return sortedProducts.map((product) => ({
|
|
24
|
+
id: product.id,
|
|
25
|
+
data: product,
|
|
26
|
+
}));
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
exports.newProductTrigger = (0, pieces_framework_1.createTrigger)({
|
|
30
|
+
auth: auth_1.bexioAuth,
|
|
31
|
+
name: 'new_product',
|
|
32
|
+
displayName: 'New Product',
|
|
33
|
+
description: 'Triggers when a new product is created',
|
|
34
|
+
aiMetadata: {
|
|
35
|
+
description: 'Fires when a new product (article) is created in Bexio. Polls the article list and emits each newly added product, including its codes, names, pricing, stock levels, and accounting references. Use to react to additions to the product catalog.',
|
|
36
|
+
},
|
|
37
|
+
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
38
|
+
props: {},
|
|
39
|
+
sampleData: {
|
|
40
|
+
id: 4,
|
|
41
|
+
user_id: 1,
|
|
42
|
+
article_type_id: 1,
|
|
43
|
+
contact_id: 14,
|
|
44
|
+
deliverer_code: null,
|
|
45
|
+
deliverer_name: null,
|
|
46
|
+
deliverer_description: null,
|
|
47
|
+
intern_code: 'wh-2019',
|
|
48
|
+
intern_name: 'Webhosting',
|
|
49
|
+
intern_description: null,
|
|
50
|
+
purchase_price: null,
|
|
51
|
+
sale_price: null,
|
|
52
|
+
purchase_total: null,
|
|
53
|
+
sale_total: null,
|
|
54
|
+
currency_id: null,
|
|
55
|
+
tax_income_id: null,
|
|
56
|
+
tax_id: null,
|
|
57
|
+
tax_expense_id: null,
|
|
58
|
+
unit_id: null,
|
|
59
|
+
is_stock: false,
|
|
60
|
+
stock_id: null,
|
|
61
|
+
stock_place_id: null,
|
|
62
|
+
stock_nr: 0,
|
|
63
|
+
stock_min_nr: 0,
|
|
64
|
+
stock_reserved_nr: 0,
|
|
65
|
+
stock_available_nr: 0,
|
|
66
|
+
stock_picked_nr: 0,
|
|
67
|
+
stock_disposed_nr: 0,
|
|
68
|
+
stock_ordered_nr: 0,
|
|
69
|
+
width: null,
|
|
70
|
+
height: null,
|
|
71
|
+
weight: null,
|
|
72
|
+
volume: null,
|
|
73
|
+
html_text: null,
|
|
74
|
+
remarks: null,
|
|
75
|
+
delivery_price: null,
|
|
76
|
+
article_group_id: null,
|
|
77
|
+
account_id: null,
|
|
78
|
+
expense_account_id: null,
|
|
79
|
+
},
|
|
80
|
+
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
81
|
+
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
82
|
+
auth: context.auth,
|
|
83
|
+
store: context.store,
|
|
84
|
+
propsValue: context.propsValue,
|
|
85
|
+
});
|
|
86
|
+
}),
|
|
87
|
+
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
88
|
+
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
89
|
+
auth: context.auth,
|
|
90
|
+
store: context.store,
|
|
91
|
+
propsValue: context.propsValue,
|
|
92
|
+
});
|
|
93
|
+
}),
|
|
94
|
+
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
95
|
+
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
96
|
+
auth: context.auth,
|
|
97
|
+
store: context.store,
|
|
98
|
+
propsValue: context.propsValue,
|
|
99
|
+
files: context.files,
|
|
100
|
+
});
|
|
101
|
+
}),
|
|
102
|
+
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
+
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
104
|
+
auth: context.auth,
|
|
105
|
+
store: context.store,
|
|
106
|
+
propsValue: context.propsValue,
|
|
107
|
+
files: context.files,
|
|
108
|
+
});
|
|
109
|
+
}),
|
|
110
|
+
});
|
|
111
|
+
//# sourceMappingURL=new-product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-product.js","sourceRoot":"","sources":["../../../src/lib/triggers/new-product.ts"],"names":[],"mappings":";;;;AAAA,oGAAoG;AACpG,qEAAqE;AACrE,gEAA8G;AAC9G,0DAAgF;AAChF,kCAAoC;AACpC,6CAA+C;AAE/C,MAAM,OAAO,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