@activepieces/piece-bexio 0.1.5 → 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/package.json +7 -14
- package/src/index.js +13 -91
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/create-company.d.ts +0 -28
- package/src/lib/actions/create-company.d.ts.map +0 -1
- package/src/lib/actions/create-company.js +0 -459
- package/src/lib/actions/create-company.js.map +0 -1
- package/src/lib/actions/create-file.d.ts +0 -4
- package/src/lib/actions/create-file.d.ts.map +0 -1
- package/src/lib/actions/create-file.js +0 -46
- package/src/lib/actions/create-file.js.map +0 -1
- package/src/lib/actions/create-manual-entry.d.ts +0 -7
- package/src/lib/actions/create-manual-entry.d.ts.map +0 -1
- package/src/lib/actions/create-manual-entry.js +0 -424
- package/src/lib/actions/create-manual-entry.js.map +0 -1
- package/src/lib/actions/create-person.d.ts +0 -30
- package/src/lib/actions/create-person.d.ts.map +0 -1
- package/src/lib/actions/create-person.js +0 -475
- package/src/lib/actions/create-person.js.map +0 -1
- package/src/lib/actions/create-product.d.ts +0 -34
- package/src/lib/actions/create-product.d.ts.map +0 -1
- package/src/lib/actions/create-product.js +0 -525
- package/src/lib/actions/create-product.js.map +0 -1
- package/src/lib/actions/create-project.d.ts +0 -17
- package/src/lib/actions/create-project.d.ts.map +0 -1
- package/src/lib/actions/create-project.js +0 -314
- package/src/lib/actions/create-project.js.map +0 -1
- package/src/lib/actions/create-sales-invoice.d.ts +0 -25
- package/src/lib/actions/create-sales-invoice.d.ts.map +0 -1
- package/src/lib/actions/create-sales-invoice.js +0 -613
- package/src/lib/actions/create-sales-invoice.js.map +0 -1
- package/src/lib/actions/create-sales-order.d.ts +0 -25
- package/src/lib/actions/create-sales-order.d.ts.map +0 -1
- package/src/lib/actions/create-sales-order.js +0 -640
- package/src/lib/actions/create-sales-order.js.map +0 -1
- package/src/lib/actions/create-sales-quote.d.ts +0 -28
- package/src/lib/actions/create-sales-quote.d.ts.map +0 -1
- package/src/lib/actions/create-sales-quote.js +0 -664
- package/src/lib/actions/create-sales-quote.js.map +0 -1
- package/src/lib/actions/create-time-tracking.d.ts +0 -17
- package/src/lib/actions/create-time-tracking.d.ts.map +0 -1
- package/src/lib/actions/create-time-tracking.js +0 -378
- package/src/lib/actions/create-time-tracking.js.map +0 -1
- package/src/lib/actions/export-invoice-pdf.d.ts +0 -5
- package/src/lib/actions/export-invoice-pdf.d.ts.map +0 -1
- package/src/lib/actions/export-invoice-pdf.js +0 -92
- package/src/lib/actions/export-invoice-pdf.js.map +0 -1
- package/src/lib/actions/find-account.d.ts +0 -6
- package/src/lib/actions/find-account.d.ts.map +0 -1
- package/src/lib/actions/find-account.js +0 -105
- package/src/lib/actions/find-account.js.map +0 -1
- package/src/lib/actions/find-company.d.ts +0 -8
- package/src/lib/actions/find-company.d.ts.map +0 -1
- package/src/lib/actions/find-company.js +0 -158
- package/src/lib/actions/find-company.js.map +0 -1
- package/src/lib/actions/find-country.d.ts +0 -7
- package/src/lib/actions/find-country.d.ts.map +0 -1
- package/src/lib/actions/find-country.js +0 -123
- package/src/lib/actions/find-country.js.map +0 -1
- package/src/lib/actions/find-person.d.ts +0 -9
- package/src/lib/actions/find-person.d.ts.map +0 -1
- package/src/lib/actions/find-person.js +0 -173
- package/src/lib/actions/find-person.js.map +0 -1
- package/src/lib/actions/find-product.d.ts +0 -7
- package/src/lib/actions/find-product.d.ts.map +0 -1
- package/src/lib/actions/find-product.js +0 -122
- package/src/lib/actions/find-product.js.map +0 -1
- package/src/lib/actions/search-invoice.d.ts +0 -7
- package/src/lib/actions/search-invoice.d.ts.map +0 -1
- package/src/lib/actions/search-invoice.js +0 -138
- package/src/lib/actions/search-invoice.js.map +0 -1
- package/src/lib/actions/search-order.d.ts +0 -7
- package/src/lib/actions/search-order.d.ts.map +0 -1
- package/src/lib/actions/search-order.js +0 -137
- package/src/lib/actions/search-order.js.map +0 -1
- package/src/lib/actions/search-quote.d.ts +0 -7
- package/src/lib/actions/search-quote.d.ts.map +0 -1
- package/src/lib/actions/search-quote.js +0 -138
- package/src/lib/actions/search-quote.js.map +0 -1
- package/src/lib/actions/send-sales-invoice.d.ts +0 -9
- package/src/lib/actions/send-sales-invoice.d.ts.map +0 -1
- package/src/lib/actions/send-sales-invoice.js +0 -108
- package/src/lib/actions/send-sales-invoice.js.map +0 -1
- package/src/lib/actions/update-company.d.ts +0 -29
- package/src/lib/actions/update-company.d.ts.map +0 -1
- package/src/lib/actions/update-company.js +0 -504
- package/src/lib/actions/update-company.js.map +0 -1
- package/src/lib/actions/update-person.d.ts +0 -31
- package/src/lib/actions/update-person.d.ts.map +0 -1
- package/src/lib/actions/update-person.js +0 -522
- package/src/lib/actions/update-person.js.map +0 -1
- package/src/lib/actions/update-product.d.ts +0 -34
- package/src/lib/actions/update-product.d.ts.map +0 -1
- package/src/lib/actions/update-product.js +0 -554
- package/src/lib/actions/update-product.js.map +0 -1
- package/src/lib/auth.d.ts +0 -2
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -49
- package/src/lib/auth.js.map +0 -1
- package/src/lib/common/client.d.ts +0 -13
- package/src/lib/common/client.d.ts.map +0 -1
- package/src/lib/common/client.js +0 -62
- package/src/lib/common/client.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -5
- package/src/lib/common/index.d.ts.map +0 -1
- package/src/lib/common/index.js +0 -8
- package/src/lib/common/index.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -14
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -116
- package/src/lib/common/props.js.map +0 -1
- package/src/lib/common/types.d.ts +0 -89
- package/src/lib/common/types.d.ts.map +0 -1
- package/src/lib/common/types.js +0 -4
- package/src/lib/common/types.js.map +0 -1
- package/src/lib/triggers/new-order.d.ts +0 -11
- package/src/lib/triggers/new-order.d.ts.map +0 -1
- package/src/lib/triggers/new-order.js +0 -150
- package/src/lib/triggers/new-order.js.map +0 -1
- package/src/lib/triggers/new-product.d.ts +0 -3
- package/src/lib/triggers/new-product.d.ts.map +0 -1
- package/src/lib/triggers/new-product.js +0 -109
- package/src/lib/triggers/new-product.js.map +0 -1
- package/src/lib/triggers/new-project.d.ts +0 -11
- package/src/lib/triggers/new-project.d.ts.map +0 -1
- package/src/lib/triggers/new-project.js +0 -139
- package/src/lib/triggers/new-project.js.map +0 -1
- package/src/lib/triggers/new-quote.d.ts +0 -11
- package/src/lib/triggers/new-quote.d.ts.map +0 -1
- package/src/lib/triggers/new-quote.js +0 -151
- package/src/lib/triggers/new-quote.js.map +0 -1
- package/src/lib/triggers/new-sales-invoice.d.ts +0 -11
- package/src/lib/triggers/new-sales-invoice.d.ts.map +0 -1
- package/src/lib/triggers/new-sales-invoice.js +0 -151
- package/src/lib/triggers/new-sales-invoice.js.map +0 -1
- package/src/lib/triggers/new-updated-company.d.ts +0 -3
- package/src/lib/triggers/new-updated-company.d.ts.map +0 -1
- package/src/lib/triggers/new-updated-company.js +0 -120
- package/src/lib/triggers/new-updated-company.js.map +0 -1
- package/src/lib/triggers/new-updated-person.d.ts +0 -3
- package/src/lib/triggers/new-updated-person.d.ts.map +0 -1
- package/src/lib/triggers/new-updated-person.js +0 -120
- package/src/lib/triggers/new-updated-person.js.map +0 -1
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newProjectTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
4
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
5
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
6
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
8
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
9
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=new-project.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-project.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAqE,MAAM,gCAAgC,CAAC;AA6DnJ,eAAO,MAAM,iBAAiB;;;;;;;;EAsG5B,CAAC"}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newProjectTrigger = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const polling = {
|
|
10
|
-
strategy: pieces_common_1.DedupeStrategy.LAST_ITEM,
|
|
11
|
-
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastItemId, propsValue }) {
|
|
12
|
-
const client = new client_1.BexioClient(auth);
|
|
13
|
-
const searchBody = [
|
|
14
|
-
{
|
|
15
|
-
field: 'name',
|
|
16
|
-
value: '',
|
|
17
|
-
criteria: 'not_null',
|
|
18
|
-
},
|
|
19
|
-
];
|
|
20
|
-
if (propsValue.status_id !== undefined && propsValue.status_id !== null) {
|
|
21
|
-
searchBody.push({
|
|
22
|
-
field: 'pr_state_id',
|
|
23
|
-
value: propsValue.status_id.toString(),
|
|
24
|
-
criteria: '=',
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
const queryParams = {
|
|
28
|
-
order_by: 'id_desc',
|
|
29
|
-
limit: '500',
|
|
30
|
-
};
|
|
31
|
-
const projects = yield client.post('/2.0/pr_project/search', searchBody, queryParams);
|
|
32
|
-
return projects.map((project) => ({
|
|
33
|
-
id: project.id,
|
|
34
|
-
data: project,
|
|
35
|
-
}));
|
|
36
|
-
}),
|
|
37
|
-
};
|
|
38
|
-
exports.newProjectTrigger = (0, pieces_framework_1.createTrigger)({
|
|
39
|
-
auth: auth_1.bexioAuth,
|
|
40
|
-
name: 'new_project',
|
|
41
|
-
displayName: 'New Project',
|
|
42
|
-
description: 'Triggers when a Project is created or updated with the chosen status',
|
|
43
|
-
aiMetadata: {
|
|
44
|
-
description: 'Fires when a project is created or updated in Bexio, optionally filtered to a chosen project status. Emits each matching project with its number, name, dates, status, type, contact, invoicing and budget settings. Use to track new or changing projects.',
|
|
45
|
-
},
|
|
46
|
-
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
47
|
-
props: {
|
|
48
|
-
status_id: pieces_framework_1.Property.Dropdown({
|
|
49
|
-
auth: auth_1.bexioAuth,
|
|
50
|
-
displayName: 'Status',
|
|
51
|
-
description: 'Filter projects by status (leave empty to trigger for all statuses)',
|
|
52
|
-
required: false,
|
|
53
|
-
refreshers: [],
|
|
54
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
55
|
-
if (!auth) {
|
|
56
|
-
return {
|
|
57
|
-
disabled: true,
|
|
58
|
-
placeholder: 'Connect your Bexio account first',
|
|
59
|
-
options: [],
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
const client = new client_1.BexioClient(auth);
|
|
64
|
-
const statuses = yield client.get('/2.0/pr_project_state').catch(() => []);
|
|
65
|
-
if (statuses.length === 0) {
|
|
66
|
-
return {
|
|
67
|
-
disabled: false,
|
|
68
|
-
placeholder: 'Status filter not available - will trigger for all statuses',
|
|
69
|
-
options: [],
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
disabled: false,
|
|
74
|
-
options: statuses.map((status) => ({
|
|
75
|
-
label: status.name,
|
|
76
|
-
value: status.id,
|
|
77
|
-
})),
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
catch (error) {
|
|
81
|
-
return {
|
|
82
|
-
disabled: false,
|
|
83
|
-
placeholder: 'Enter status ID manually or leave empty for all statuses',
|
|
84
|
-
options: [],
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}),
|
|
88
|
-
}),
|
|
89
|
-
},
|
|
90
|
-
sampleData: {
|
|
91
|
-
id: 2,
|
|
92
|
-
uuid: '046b6c7f-0b8a-43b9-b35d-6489e6daee91',
|
|
93
|
-
nr: '000002',
|
|
94
|
-
name: 'Villa Kunterbunt',
|
|
95
|
-
start_date: '2019-07-12 00:00:00',
|
|
96
|
-
end_date: null,
|
|
97
|
-
comment: '',
|
|
98
|
-
pr_state_id: 2,
|
|
99
|
-
pr_project_type_id: 2,
|
|
100
|
-
contact_id: 2,
|
|
101
|
-
contact_sub_id: null,
|
|
102
|
-
pr_invoice_type_id: 3,
|
|
103
|
-
pr_invoice_type_amount: '230.00',
|
|
104
|
-
pr_budget_type_id: 1,
|
|
105
|
-
pr_budget_type_amount: '200.00',
|
|
106
|
-
user_id: 1,
|
|
107
|
-
},
|
|
108
|
-
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
109
|
-
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
110
|
-
auth: context.auth,
|
|
111
|
-
store: context.store,
|
|
112
|
-
propsValue: context.propsValue,
|
|
113
|
-
});
|
|
114
|
-
}),
|
|
115
|
-
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
116
|
-
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
117
|
-
auth: context.auth,
|
|
118
|
-
store: context.store,
|
|
119
|
-
propsValue: context.propsValue,
|
|
120
|
-
});
|
|
121
|
-
}),
|
|
122
|
-
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
123
|
-
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
124
|
-
auth: context.auth,
|
|
125
|
-
store: context.store,
|
|
126
|
-
propsValue: context.propsValue,
|
|
127
|
-
files: context.files,
|
|
128
|
-
});
|
|
129
|
-
}),
|
|
130
|
-
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
131
|
-
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
132
|
-
auth: context.auth,
|
|
133
|
-
store: context.store,
|
|
134
|
-
propsValue: context.propsValue,
|
|
135
|
-
files: context.files,
|
|
136
|
-
});
|
|
137
|
-
}),
|
|
138
|
-
});
|
|
139
|
-
//# sourceMappingURL=new-project.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-project.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-project.ts"],"names":[],"mappings":";;;;AAAA,qEAAmJ;AACnJ,+DAAqF;AACrF,kCAAoC;AACpC,6CAA+C;AAG/C,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAAyC,EAAE,oDAApC,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE;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A;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newQuoteTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
4
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
5
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
6
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
8
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
9
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=new-quote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-quote.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAA+C,MAAM,gCAAgC,CAAC;AA4E7H,eAAO,MAAM,eAAe;;;;;;;;EA4G1B,CAAC"}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newQuoteTrigger = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
10
|
-
const polling = {
|
|
11
|
-
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
12
|
-
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastFetchEpochMS, propsValue }) {
|
|
13
|
-
const client = new client_1.BexioClient(auth);
|
|
14
|
-
const isTest = lastFetchEpochMS === 0;
|
|
15
|
-
const lastFetchDate = isTest
|
|
16
|
-
? (0, dayjs_1.default)().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss')
|
|
17
|
-
: (0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm:ss');
|
|
18
|
-
const searchBody = [
|
|
19
|
-
{
|
|
20
|
-
field: 'updated_at',
|
|
21
|
-
value: lastFetchDate,
|
|
22
|
-
criteria: '>=',
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
if (propsValue.status_id !== undefined && propsValue.status_id !== null) {
|
|
26
|
-
searchBody.push({
|
|
27
|
-
field: 'kb_item_status_id',
|
|
28
|
-
value: propsValue.status_id.toString(),
|
|
29
|
-
criteria: '=',
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
const queryParams = {
|
|
33
|
-
order_by: 'updated_at_desc',
|
|
34
|
-
limit: isTest ? '5' : '500',
|
|
35
|
-
};
|
|
36
|
-
const quotes = yield client.post('/2.0/kb_offer/search', searchBody, queryParams);
|
|
37
|
-
return quotes.map((quote) => {
|
|
38
|
-
const updatedAt = quote.updated_at || new Date().toISOString();
|
|
39
|
-
const epochMilliSeconds = (0, dayjs_1.default)(updatedAt).valueOf();
|
|
40
|
-
return {
|
|
41
|
-
epochMilliSeconds,
|
|
42
|
-
data: quote,
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
}),
|
|
46
|
-
};
|
|
47
|
-
exports.newQuoteTrigger = (0, pieces_framework_1.createTrigger)({
|
|
48
|
-
auth: auth_1.bexioAuth,
|
|
49
|
-
name: 'new_quote',
|
|
50
|
-
displayName: 'New Quotes',
|
|
51
|
-
description: 'Triggers when a quote is created or updated with the chosen status',
|
|
52
|
-
aiMetadata: {
|
|
53
|
-
description: 'Fires when a quote (offer) is created or its updated timestamp changes in Bexio, optionally filtered to a chosen quote status. Emits each matching quote with its document number, contact, totals (gross, net, taxes), validity dates, and status. Use to react to new or modified quotes.',
|
|
54
|
-
},
|
|
55
|
-
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
56
|
-
props: {
|
|
57
|
-
status_id: pieces_framework_1.Property.Dropdown({
|
|
58
|
-
auth: auth_1.bexioAuth,
|
|
59
|
-
displayName: 'Status',
|
|
60
|
-
description: 'Filter quotes by status (leave empty to trigger for all statuses)',
|
|
61
|
-
required: false,
|
|
62
|
-
refreshers: [],
|
|
63
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
64
|
-
if (!auth) {
|
|
65
|
-
return {
|
|
66
|
-
disabled: true,
|
|
67
|
-
placeholder: 'Connect your Bexio account first',
|
|
68
|
-
options: [],
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
try {
|
|
72
|
-
const client = new client_1.BexioClient(auth);
|
|
73
|
-
const statuses = yield client.get('/2.0/kb_offer_status').catch(() => []);
|
|
74
|
-
if (statuses.length === 0) {
|
|
75
|
-
return {
|
|
76
|
-
disabled: false,
|
|
77
|
-
placeholder: 'Status filter not available - will trigger for all statuses',
|
|
78
|
-
options: [],
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
disabled: false,
|
|
83
|
-
options: statuses.map((status) => ({
|
|
84
|
-
label: status.name,
|
|
85
|
-
value: status.id,
|
|
86
|
-
})),
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
catch (error) {
|
|
90
|
-
return {
|
|
91
|
-
disabled: false,
|
|
92
|
-
placeholder: 'Enter status ID manually or leave empty for all statuses',
|
|
93
|
-
options: [],
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}),
|
|
97
|
-
}),
|
|
98
|
-
},
|
|
99
|
-
sampleData: {
|
|
100
|
-
id: 4,
|
|
101
|
-
document_nr: 'AN-00001',
|
|
102
|
-
title: null,
|
|
103
|
-
contact_id: 14,
|
|
104
|
-
contact_sub_id: null,
|
|
105
|
-
user_id: 1,
|
|
106
|
-
project_id: null,
|
|
107
|
-
language_id: 1,
|
|
108
|
-
bank_account_id: 1,
|
|
109
|
-
currency_id: 1,
|
|
110
|
-
payment_type_id: 1,
|
|
111
|
-
total_gross: '17.800000',
|
|
112
|
-
total_net: '17.800000',
|
|
113
|
-
total_taxes: '1.3706',
|
|
114
|
-
total: '19.150000',
|
|
115
|
-
kb_item_status_id: 3,
|
|
116
|
-
is_valid_from: '2019-06-24',
|
|
117
|
-
is_valid_until: '2019-07-24',
|
|
118
|
-
updated_at: '2019-04-08 13:17:32',
|
|
119
|
-
},
|
|
120
|
-
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
121
|
-
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
122
|
-
auth: context.auth,
|
|
123
|
-
store: context.store,
|
|
124
|
-
propsValue: context.propsValue,
|
|
125
|
-
});
|
|
126
|
-
}),
|
|
127
|
-
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
128
|
-
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
129
|
-
auth: context.auth,
|
|
130
|
-
store: context.store,
|
|
131
|
-
propsValue: context.propsValue,
|
|
132
|
-
});
|
|
133
|
-
}),
|
|
134
|
-
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
135
|
-
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
136
|
-
auth: context.auth,
|
|
137
|
-
store: context.store,
|
|
138
|
-
propsValue: context.propsValue,
|
|
139
|
-
files: context.files,
|
|
140
|
-
});
|
|
141
|
-
}),
|
|
142
|
-
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
143
|
-
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
144
|
-
auth: context.auth,
|
|
145
|
-
store: context.store,
|
|
146
|
-
propsValue: context.propsValue,
|
|
147
|
-
files: context.files,
|
|
148
|
-
});
|
|
149
|
-
}),
|
|
150
|
-
});
|
|
151
|
-
//# sourceMappingURL=new-quote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-quote.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-quote.ts"],"names":[],"mappings":";;;;AAAA,qEAA6H;AAC7H,+DAAqF;AACrF,kCAAoC;AACpC,6CAA+C;AAE/C,0DAA0B;AAE1B,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE;QAClD,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,IAAI,CAAC,CAAC;QAErC,MAAM,MAAM,GAAG,gBAAgB,KAAK,CAAC,CAAC;QAEtC,MAAM,aAAa,GAAG,MAAM;YAC1B,CAAC,CAAC,IAAA,eAAK,GAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC;YAC1D,CAAC,CAAC,IAAA,eAAK,EAAC,g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AAE,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"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newSalesInvoiceTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
4
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
5
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
6
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
8
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
9
|
-
status_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=new-sales-invoice.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-sales-invoice.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-sales-invoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAqE,MAAM,gCAAgC,CAAC;AA4EnJ,eAAO,MAAM,sBAAsB;;;;;;;;EA4GjC,CAAC"}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newSalesInvoiceTrigger = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
10
|
-
const polling = {
|
|
11
|
-
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
12
|
-
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastFetchEpochMS, propsValue }) {
|
|
13
|
-
const client = new client_1.BexioClient(auth);
|
|
14
|
-
const isTest = lastFetchEpochMS === 0;
|
|
15
|
-
const lastFetchDate = isTest
|
|
16
|
-
? (0, dayjs_1.default)().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss')
|
|
17
|
-
: (0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm:ss');
|
|
18
|
-
const searchBody = [
|
|
19
|
-
{
|
|
20
|
-
field: 'updated_at',
|
|
21
|
-
value: lastFetchDate,
|
|
22
|
-
criteria: '>=',
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
if (propsValue.status_id !== undefined && propsValue.status_id !== null) {
|
|
26
|
-
searchBody.push({
|
|
27
|
-
field: 'kb_item_status_id',
|
|
28
|
-
value: propsValue.status_id.toString(),
|
|
29
|
-
criteria: '=',
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
const queryParams = {
|
|
33
|
-
order_by: 'updated_at_desc',
|
|
34
|
-
limit: isTest ? '5' : '500',
|
|
35
|
-
};
|
|
36
|
-
const invoices = yield client.post('/2.0/kb_invoice/search', searchBody, queryParams);
|
|
37
|
-
return invoices.map((invoice) => {
|
|
38
|
-
const updatedAt = invoice.updated_at || new Date().toISOString();
|
|
39
|
-
const epochMilliSeconds = (0, dayjs_1.default)(updatedAt).valueOf();
|
|
40
|
-
return {
|
|
41
|
-
epochMilliSeconds,
|
|
42
|
-
data: invoice,
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
}),
|
|
46
|
-
};
|
|
47
|
-
exports.newSalesInvoiceTrigger = (0, pieces_framework_1.createTrigger)({
|
|
48
|
-
auth: auth_1.bexioAuth,
|
|
49
|
-
name: 'new_sales_invoice',
|
|
50
|
-
displayName: 'New Sales-Invoice',
|
|
51
|
-
description: 'Triggers when a Sales-Invoice is created or updated with the chosen status',
|
|
52
|
-
aiMetadata: {
|
|
53
|
-
description: 'Fires when a sales invoice is created or its updated timestamp changes in Bexio, optionally filtered to a chosen invoice status. Emits each matching invoice with its document number, contact, totals (gross, net, taxes), validity dates, and status. Use to react to new or modified customer invoices.',
|
|
54
|
-
},
|
|
55
|
-
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
56
|
-
props: {
|
|
57
|
-
status_id: pieces_framework_1.Property.Dropdown({
|
|
58
|
-
auth: auth_1.bexioAuth,
|
|
59
|
-
displayName: 'Status',
|
|
60
|
-
description: 'Filter invoices by status (leave empty to trigger for all statuses)',
|
|
61
|
-
required: false,
|
|
62
|
-
refreshers: [],
|
|
63
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
64
|
-
if (!auth) {
|
|
65
|
-
return {
|
|
66
|
-
disabled: true,
|
|
67
|
-
placeholder: 'Connect your Bexio account first',
|
|
68
|
-
options: [],
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
try {
|
|
72
|
-
const client = new client_1.BexioClient(auth);
|
|
73
|
-
const statuses = yield client.get('/2.0/kb_invoice_status').catch(() => []);
|
|
74
|
-
if (statuses.length === 0) {
|
|
75
|
-
return {
|
|
76
|
-
disabled: false,
|
|
77
|
-
placeholder: 'Status filter not available - will trigger for all statuses',
|
|
78
|
-
options: [],
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
disabled: false,
|
|
83
|
-
options: statuses.map((status) => ({
|
|
84
|
-
label: status.name,
|
|
85
|
-
value: status.id,
|
|
86
|
-
})),
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
catch (error) {
|
|
90
|
-
return {
|
|
91
|
-
disabled: false,
|
|
92
|
-
placeholder: 'Enter status ID manually or leave empty for all statuses',
|
|
93
|
-
options: [],
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}),
|
|
97
|
-
}),
|
|
98
|
-
},
|
|
99
|
-
sampleData: {
|
|
100
|
-
id: 4,
|
|
101
|
-
document_nr: 'RE-00001',
|
|
102
|
-
title: null,
|
|
103
|
-
contact_id: 14,
|
|
104
|
-
contact_sub_id: null,
|
|
105
|
-
user_id: 1,
|
|
106
|
-
project_id: null,
|
|
107
|
-
language_id: 1,
|
|
108
|
-
bank_account_id: 1,
|
|
109
|
-
currency_id: 1,
|
|
110
|
-
payment_type_id: 1,
|
|
111
|
-
total_gross: '17.800000',
|
|
112
|
-
total_net: '17.800000',
|
|
113
|
-
total_taxes: '1.3706',
|
|
114
|
-
total: '19.150000',
|
|
115
|
-
kb_item_status_id: 3,
|
|
116
|
-
is_valid_from: '2019-06-24',
|
|
117
|
-
is_valid_to: '2019-07-24',
|
|
118
|
-
updated_at: '2019-04-08 13:17:32',
|
|
119
|
-
},
|
|
120
|
-
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
121
|
-
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
122
|
-
auth: context.auth,
|
|
123
|
-
store: context.store,
|
|
124
|
-
propsValue: context.propsValue,
|
|
125
|
-
});
|
|
126
|
-
}),
|
|
127
|
-
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
128
|
-
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
129
|
-
auth: context.auth,
|
|
130
|
-
store: context.store,
|
|
131
|
-
propsValue: context.propsValue,
|
|
132
|
-
});
|
|
133
|
-
}),
|
|
134
|
-
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
135
|
-
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
136
|
-
auth: context.auth,
|
|
137
|
-
store: context.store,
|
|
138
|
-
propsValue: context.propsValue,
|
|
139
|
-
files: context.files,
|
|
140
|
-
});
|
|
141
|
-
}),
|
|
142
|
-
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
143
|
-
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
144
|
-
auth: context.auth,
|
|
145
|
-
store: context.store,
|
|
146
|
-
propsValue: context.propsValue,
|
|
147
|
-
files: context.files,
|
|
148
|
-
});
|
|
149
|
-
}),
|
|
150
|
-
});
|
|
151
|
-
//# sourceMappingURL=new-sales-invoice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-sales-invoice.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-sales-invoice.ts"],"names":[],"mappings":";;;;AAAA,qEAAmJ;AACnJ,+DAAqF;AACrF,kCAAoC;AACpC,6CAA+C;AAE/C,0DAA0B;AAE1B,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EA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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"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newUpdatedCompanyTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}>;
|
|
3
|
-
//# sourceMappingURL=new-updated-company.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-updated-company.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-updated-company.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAA2D,MAAM,gCAAgC,CAAC;AAqFzI,eAAO,MAAM,wBAAwB,kwBA0EnC,CAAC"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newUpdatedCompanyTrigger = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
10
|
-
const polling = {
|
|
11
|
-
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
12
|
-
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastFetchEpochMS }) {
|
|
13
|
-
const client = new client_1.BexioClient(auth);
|
|
14
|
-
const isTest = lastFetchEpochMS === 0;
|
|
15
|
-
const lastFetchDate = isTest
|
|
16
|
-
? (0, dayjs_1.default)().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss')
|
|
17
|
-
: (0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm:ss');
|
|
18
|
-
const searchBody = [
|
|
19
|
-
{
|
|
20
|
-
field: 'contact_type_id',
|
|
21
|
-
value: '1', // 1 = company
|
|
22
|
-
criteria: '=',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
field: 'updated_at',
|
|
26
|
-
value: lastFetchDate,
|
|
27
|
-
criteria: '>=',
|
|
28
|
-
},
|
|
29
|
-
];
|
|
30
|
-
const queryParams = {
|
|
31
|
-
order_by: 'updated_at_desc',
|
|
32
|
-
limit: isTest ? '5' : '500', // Limit to 5 for test, 500 for normal polling
|
|
33
|
-
};
|
|
34
|
-
const companies = yield client.post('/2.0/contact/search', searchBody, queryParams);
|
|
35
|
-
return companies.map((company) => {
|
|
36
|
-
const updatedAt = company.updated_at || new Date().toISOString();
|
|
37
|
-
const epochMilliSeconds = (0, dayjs_1.default)(updatedAt).valueOf();
|
|
38
|
-
return {
|
|
39
|
-
epochMilliSeconds,
|
|
40
|
-
data: company,
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
}),
|
|
44
|
-
};
|
|
45
|
-
exports.newUpdatedCompanyTrigger = (0, pieces_framework_1.createTrigger)({
|
|
46
|
-
auth: auth_1.bexioAuth,
|
|
47
|
-
name: 'new_updated_company',
|
|
48
|
-
displayName: 'New/Updated Company',
|
|
49
|
-
description: 'Triggers when a company is added or updated',
|
|
50
|
-
aiMetadata: {
|
|
51
|
-
description: 'Fires when a company contact is created or its updated timestamp changes in Bexio. Emits each matching company with its name, address, contact details (email, phone), group memberships, and lead status. Use to react to new or modified organization contacts.',
|
|
52
|
-
},
|
|
53
|
-
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
54
|
-
props: {},
|
|
55
|
-
sampleData: {
|
|
56
|
-
id: 4,
|
|
57
|
-
nr: null,
|
|
58
|
-
contact_type_id: 1,
|
|
59
|
-
name_1: 'Example Company',
|
|
60
|
-
name_2: null,
|
|
61
|
-
salutation_id: 2,
|
|
62
|
-
salutation_form: null,
|
|
63
|
-
title_id: null,
|
|
64
|
-
birthday: null,
|
|
65
|
-
address: 'Smith Street 22',
|
|
66
|
-
street_name: 'Smith Street',
|
|
67
|
-
house_number: '77',
|
|
68
|
-
address_addition: 'Building C',
|
|
69
|
-
postcode: '8004',
|
|
70
|
-
city: 'Zurich',
|
|
71
|
-
country_id: 1,
|
|
72
|
-
mail: 'contact@example.org',
|
|
73
|
-
mail_second: '',
|
|
74
|
-
phone_fixed: '',
|
|
75
|
-
phone_fixed_second: '',
|
|
76
|
-
phone_mobile: '',
|
|
77
|
-
fax: '',
|
|
78
|
-
url: '',
|
|
79
|
-
skype_name: '',
|
|
80
|
-
remarks: '',
|
|
81
|
-
language_id: null,
|
|
82
|
-
is_lead: false,
|
|
83
|
-
contact_group_ids: '1,2',
|
|
84
|
-
contact_branch_ids: null,
|
|
85
|
-
user_id: 1,
|
|
86
|
-
owner_id: 1,
|
|
87
|
-
updated_at: '2019-04-08 13:17:32',
|
|
88
|
-
},
|
|
89
|
-
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
90
|
-
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
91
|
-
auth: context.auth,
|
|
92
|
-
store: context.store,
|
|
93
|
-
propsValue: context.propsValue,
|
|
94
|
-
});
|
|
95
|
-
}),
|
|
96
|
-
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
97
|
-
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
98
|
-
auth: context.auth,
|
|
99
|
-
store: context.store,
|
|
100
|
-
propsValue: context.propsValue,
|
|
101
|
-
});
|
|
102
|
-
}),
|
|
103
|
-
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
104
|
-
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
105
|
-
auth: context.auth,
|
|
106
|
-
store: context.store,
|
|
107
|
-
propsValue: context.propsValue,
|
|
108
|
-
files: context.files,
|
|
109
|
-
});
|
|
110
|
-
}),
|
|
111
|
-
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
112
|
-
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
113
|
-
auth: context.auth,
|
|
114
|
-
store: context.store,
|
|
115
|
-
propsValue: context.propsValue,
|
|
116
|
-
files: context.files,
|
|
117
|
-
});
|
|
118
|
-
}),
|
|
119
|
-
});
|
|
120
|
-
//# sourceMappingURL=new-updated-company.js.map
|