@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,193 @@
|
|
|
1
|
+
import { createAction, Property, OAuth2PropertyValue } from '@agnocon/pieces-framework';
|
|
2
|
+
import { bexioAuth } from '../auth';
|
|
3
|
+
import { BexioClient } from '../common/client';
|
|
4
|
+
|
|
5
|
+
export const findCompanyAction = createAction({
|
|
6
|
+
auth: bexioAuth,
|
|
7
|
+
name: 'find_company',
|
|
8
|
+
displayName: 'Find Company',
|
|
9
|
+
description: 'Search for company contacts using various criteria',
|
|
10
|
+
audience: 'both',
|
|
11
|
+
aiMetadata: { description: 'Searches Bexio contacts for companies, matching one or more field criteria (name, number, email, city, country, etc.) with operators such as contains, equals, or comparison; results are automatically filtered to company-type contacts. Use to locate a company before referencing or updating it; pick Find Country/Find Product/Find Account for those object types. Read-only and idempotent.', idempotent: true },
|
|
12
|
+
props: {
|
|
13
|
+
search_criteria: Property.Array({
|
|
14
|
+
displayName: 'Search Criteria',
|
|
15
|
+
description: 'Search criteria for finding companies',
|
|
16
|
+
required: true,
|
|
17
|
+
properties: {
|
|
18
|
+
field: Property.StaticDropdown({
|
|
19
|
+
displayName: 'Search Field',
|
|
20
|
+
description: 'Field to search in',
|
|
21
|
+
required: true,
|
|
22
|
+
options: {
|
|
23
|
+
disabled: false,
|
|
24
|
+
options: [
|
|
25
|
+
{ label: 'ID', value: 'id' },
|
|
26
|
+
{ label: 'Company Name', value: 'name_1' },
|
|
27
|
+
{ label: 'Company Addition', value: 'name_2' },
|
|
28
|
+
{ label: 'Contact Number', value: 'nr' },
|
|
29
|
+
{ label: 'Address', value: 'address' },
|
|
30
|
+
{ label: 'Email', value: 'mail' },
|
|
31
|
+
{ label: 'Secondary Email', value: 'mail_second' },
|
|
32
|
+
{ label: 'Postcode', value: 'postcode' },
|
|
33
|
+
{ label: 'City', value: 'city' },
|
|
34
|
+
{ label: 'Country ID', value: 'country_id' },
|
|
35
|
+
{ label: 'Contact Group IDs', value: 'contact_group_ids' },
|
|
36
|
+
{ label: 'Contact Type ID', value: 'contact_type_id' },
|
|
37
|
+
{ label: 'Updated At', value: 'updated_at' },
|
|
38
|
+
{ label: 'User ID', value: 'user_id' },
|
|
39
|
+
{ label: 'Phone', value: 'phone_fixed' },
|
|
40
|
+
{ label: 'Mobile Phone', value: 'phone_mobile' },
|
|
41
|
+
{ label: 'Fax', value: 'fax' },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
value: Property.ShortText({
|
|
46
|
+
displayName: 'Search Value',
|
|
47
|
+
description: 'Value to search for',
|
|
48
|
+
required: true,
|
|
49
|
+
}),
|
|
50
|
+
criteria: Property.StaticDropdown({
|
|
51
|
+
displayName: 'Criteria',
|
|
52
|
+
description: 'Search criteria type',
|
|
53
|
+
required: false,
|
|
54
|
+
defaultValue: 'like',
|
|
55
|
+
options: {
|
|
56
|
+
disabled: false,
|
|
57
|
+
options: [
|
|
58
|
+
{ label: 'Contains (like)', value: 'like' },
|
|
59
|
+
{ label: 'Exact match (=)', value: '=' },
|
|
60
|
+
{ label: 'Exact match (equal)', value: 'equal' },
|
|
61
|
+
{ label: 'Not equal (!=)', value: '!=' },
|
|
62
|
+
{ label: 'Not equal (not_equal)', value: 'not_equal' },
|
|
63
|
+
{ label: 'Greater than (>)', value: '>' },
|
|
64
|
+
{ label: 'Greater than (greater_than)', value: 'greater_than' },
|
|
65
|
+
{ label: 'Greater or equal (>=)', value: '>=' },
|
|
66
|
+
{ label: 'Greater or equal (greater_equal)', value: 'greater_equal' },
|
|
67
|
+
{ label: 'Less than (<)', value: '<' },
|
|
68
|
+
{ label: 'Less than (less_than)', value: 'less_than' },
|
|
69
|
+
{ label: 'Less or equal (<=)', value: '<=' },
|
|
70
|
+
{ label: 'Less or equal (less_equal)', value: 'less_equal' },
|
|
71
|
+
{ label: 'Does not contain (not_like)', value: 'not_like' },
|
|
72
|
+
{ label: 'Is NULL', value: 'is_null' },
|
|
73
|
+
{ label: 'Is not NULL', value: 'not_null' },
|
|
74
|
+
{ label: 'In (array)', value: 'in' },
|
|
75
|
+
{ label: 'Not in (array)', value: 'not_in' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
order_by: Property.StaticDropdown({
|
|
82
|
+
displayName: 'Order By',
|
|
83
|
+
description: 'Field to order results by',
|
|
84
|
+
required: false,
|
|
85
|
+
defaultValue: 'id',
|
|
86
|
+
options: {
|
|
87
|
+
disabled: false,
|
|
88
|
+
options: [
|
|
89
|
+
{ label: 'ID', value: 'id' },
|
|
90
|
+
{ label: 'Contact Number', value: 'nr' },
|
|
91
|
+
{ label: 'Company Name', value: 'name_1' },
|
|
92
|
+
{ label: 'Updated At', value: 'updated_at' },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
limit: Property.Number({
|
|
97
|
+
displayName: 'Limit',
|
|
98
|
+
description: 'Maximum number of results to return (max 2000)',
|
|
99
|
+
required: false,
|
|
100
|
+
defaultValue: 500,
|
|
101
|
+
}),
|
|
102
|
+
offset: Property.Number({
|
|
103
|
+
displayName: 'Offset',
|
|
104
|
+
description: 'Number of results to skip',
|
|
105
|
+
required: false,
|
|
106
|
+
defaultValue: 0,
|
|
107
|
+
}),
|
|
108
|
+
show_archived: Property.Checkbox({
|
|
109
|
+
displayName: 'Show Archived',
|
|
110
|
+
description: 'Show archived contacts only',
|
|
111
|
+
required: false,
|
|
112
|
+
defaultValue: false,
|
|
113
|
+
}),
|
|
114
|
+
},
|
|
115
|
+
async run({ auth, propsValue }) {
|
|
116
|
+
const client = new BexioClient(auth);
|
|
117
|
+
const searchCriteria = propsValue['search_criteria'] as Array<Record<string, unknown>>;
|
|
118
|
+
const orderBy = propsValue['order_by'] as string | undefined;
|
|
119
|
+
const limit = propsValue['limit'] as number | undefined;
|
|
120
|
+
const offset = propsValue['offset'] as number | undefined;
|
|
121
|
+
const showArchived = propsValue['show_archived'] as boolean | undefined;
|
|
122
|
+
|
|
123
|
+
const searchBody = searchCriteria.map((criteria) => ({
|
|
124
|
+
field: criteria['field'] as string,
|
|
125
|
+
value: criteria['value'] as string,
|
|
126
|
+
criteria: (criteria['criteria'] as string) || 'like',
|
|
127
|
+
}));
|
|
128
|
+
|
|
129
|
+
// Add contact_type_id filter to only return companies if not already specified
|
|
130
|
+
const hasContactTypeFilter = searchCriteria.some(
|
|
131
|
+
(criteria) => (criteria['field'] as string) === 'contact_type_id'
|
|
132
|
+
);
|
|
133
|
+
if (!hasContactTypeFilter) {
|
|
134
|
+
searchBody.push({
|
|
135
|
+
field: 'contact_type_id',
|
|
136
|
+
value: '1',
|
|
137
|
+
criteria: '=',
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const queryParams: Record<string, string> = {};
|
|
142
|
+
if (orderBy) {
|
|
143
|
+
queryParams['order_by'] = orderBy;
|
|
144
|
+
}
|
|
145
|
+
if (limit !== undefined) {
|
|
146
|
+
queryParams['limit'] = limit.toString();
|
|
147
|
+
}
|
|
148
|
+
if (offset !== undefined) {
|
|
149
|
+
queryParams['offset'] = offset.toString();
|
|
150
|
+
}
|
|
151
|
+
if (showArchived !== undefined) {
|
|
152
|
+
queryParams['show_archived'] = showArchived.toString();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const response = await client.post<Array<{
|
|
156
|
+
id: number;
|
|
157
|
+
nr: string | null;
|
|
158
|
+
contact_type_id: number;
|
|
159
|
+
name_1: string;
|
|
160
|
+
name_2: string | null;
|
|
161
|
+
salutation_id: number | null;
|
|
162
|
+
salutation_form: number | null;
|
|
163
|
+
title_id: number | null;
|
|
164
|
+
birthday: string | null;
|
|
165
|
+
address: string | null;
|
|
166
|
+
street_name: string | null;
|
|
167
|
+
house_number: string | null;
|
|
168
|
+
address_addition: string | null;
|
|
169
|
+
postcode: string | null;
|
|
170
|
+
city: string | null;
|
|
171
|
+
country_id: number | null;
|
|
172
|
+
mail: string | null;
|
|
173
|
+
mail_second: string | null;
|
|
174
|
+
phone_fixed: string | null;
|
|
175
|
+
phone_fixed_second: string | null;
|
|
176
|
+
phone_mobile: string | null;
|
|
177
|
+
fax: string | null;
|
|
178
|
+
url: string | null;
|
|
179
|
+
skype_name: string | null;
|
|
180
|
+
remarks: string | null;
|
|
181
|
+
language_id: number | null;
|
|
182
|
+
is_lead: boolean;
|
|
183
|
+
contact_group_ids: string | null;
|
|
184
|
+
contact_branch_ids: string | null;
|
|
185
|
+
user_id: number;
|
|
186
|
+
owner_id: number;
|
|
187
|
+
updated_at: string;
|
|
188
|
+
}>>('/2.0/contact/search', searchBody, queryParams);
|
|
189
|
+
|
|
190
|
+
return response;
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { createAction, Property, OAuth2PropertyValue } from '@agnocon/pieces-framework';
|
|
2
|
+
import { bexioAuth } from '../auth';
|
|
3
|
+
import { BexioClient } from '../common/client';
|
|
4
|
+
|
|
5
|
+
export const findCountryAction = createAction({
|
|
6
|
+
auth: bexioAuth,
|
|
7
|
+
name: 'find_country',
|
|
8
|
+
displayName: 'Find Country',
|
|
9
|
+
description: 'Search for countries using various criteria',
|
|
10
|
+
audience: 'both',
|
|
11
|
+
aiMetadata: { description: 'Searches the Bexio country list by name or short code with operators such as contains or equals. Use to resolve a country to its id before setting country_id on a contact or other record. Read-only and idempotent.', idempotent: true },
|
|
12
|
+
props: {
|
|
13
|
+
search_criteria: Property.Array({
|
|
14
|
+
displayName: 'Search Criteria',
|
|
15
|
+
description: 'Search criteria for finding countries',
|
|
16
|
+
required: true,
|
|
17
|
+
properties: {
|
|
18
|
+
field: Property.StaticDropdown({
|
|
19
|
+
displayName: 'Search Field',
|
|
20
|
+
description: 'Field to search in',
|
|
21
|
+
required: true,
|
|
22
|
+
options: {
|
|
23
|
+
disabled: false,
|
|
24
|
+
options: [
|
|
25
|
+
{ label: 'Country Name', value: 'name' },
|
|
26
|
+
{ label: 'Country Code (Short)', value: 'name_short' },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
value: Property.ShortText({
|
|
31
|
+
displayName: 'Search Value',
|
|
32
|
+
description: 'Value to search for',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
criteria: Property.StaticDropdown({
|
|
36
|
+
displayName: 'Criteria',
|
|
37
|
+
description: 'Search criteria type',
|
|
38
|
+
required: false,
|
|
39
|
+
defaultValue: 'like',
|
|
40
|
+
options: {
|
|
41
|
+
disabled: false,
|
|
42
|
+
options: [
|
|
43
|
+
{ label: 'Contains (like)', value: 'like' },
|
|
44
|
+
{ label: 'Exact match (=)', value: '=' },
|
|
45
|
+
{ label: 'Exact match (equal)', value: 'equal' },
|
|
46
|
+
{ label: 'Not equal (!=)', value: '!=' },
|
|
47
|
+
{ label: 'Not equal (not_equal)', value: 'not_equal' },
|
|
48
|
+
{ label: 'Greater than (>)', value: '>' },
|
|
49
|
+
{ label: 'Greater than (greater_than)', value: 'greater_than' },
|
|
50
|
+
{ label: 'Greater or equal (>=)', value: '>=' },
|
|
51
|
+
{ label: 'Greater or equal (greater_equal)', value: 'greater_equal' },
|
|
52
|
+
{ label: 'Less than (<)', value: '<' },
|
|
53
|
+
{ label: 'Less than (less_than)', value: 'less_than' },
|
|
54
|
+
{ label: 'Less or equal (<=)', value: '<=' },
|
|
55
|
+
{ label: 'Less or equal (less_equal)', value: 'less_equal' },
|
|
56
|
+
{ label: 'Does not contain (not_like)', value: 'not_like' },
|
|
57
|
+
{ label: 'Is NULL', value: 'is_null' },
|
|
58
|
+
{ label: 'Is not NULL', value: 'not_null' },
|
|
59
|
+
{ label: 'In (array)', value: 'in' },
|
|
60
|
+
{ label: 'Not in (array)', value: 'not_in' },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
},
|
|
65
|
+
}),
|
|
66
|
+
order_by: Property.StaticDropdown({
|
|
67
|
+
displayName: 'Order By',
|
|
68
|
+
description: 'Field to order results by',
|
|
69
|
+
required: false,
|
|
70
|
+
defaultValue: 'id',
|
|
71
|
+
options: {
|
|
72
|
+
disabled: false,
|
|
73
|
+
options: [
|
|
74
|
+
{ label: 'ID', value: 'id' },
|
|
75
|
+
{ label: 'Country Name', value: 'name' },
|
|
76
|
+
{ label: 'Country Code', value: 'name_short' },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
}),
|
|
80
|
+
limit: Property.Number({
|
|
81
|
+
displayName: 'Limit',
|
|
82
|
+
description: 'Maximum number of results to return (max 2000)',
|
|
83
|
+
required: false,
|
|
84
|
+
defaultValue: 500,
|
|
85
|
+
}),
|
|
86
|
+
offset: Property.Number({
|
|
87
|
+
displayName: 'Offset',
|
|
88
|
+
description: 'Number of results to skip',
|
|
89
|
+
required: false,
|
|
90
|
+
defaultValue: 0,
|
|
91
|
+
}),
|
|
92
|
+
},
|
|
93
|
+
async run({ auth, propsValue }) {
|
|
94
|
+
const client = new BexioClient(auth);
|
|
95
|
+
const searchCriteria = propsValue['search_criteria'] as Array<Record<string, unknown>>;
|
|
96
|
+
const orderBy = propsValue['order_by'] as string | undefined;
|
|
97
|
+
const limit = propsValue['limit'] as number | undefined;
|
|
98
|
+
const offset = propsValue['offset'] as number | undefined;
|
|
99
|
+
|
|
100
|
+
const searchBody = searchCriteria.map((criteria) => ({
|
|
101
|
+
field: criteria['field'] as string,
|
|
102
|
+
value: criteria['value'] as string,
|
|
103
|
+
criteria: (criteria['criteria'] as string) || 'like',
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const queryParams: Record<string, string> = {};
|
|
107
|
+
if (orderBy) {
|
|
108
|
+
queryParams['order_by'] = orderBy;
|
|
109
|
+
}
|
|
110
|
+
if (limit !== undefined) {
|
|
111
|
+
queryParams['limit'] = limit.toString();
|
|
112
|
+
}
|
|
113
|
+
if (offset !== undefined) {
|
|
114
|
+
queryParams['offset'] = offset.toString();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const response = await client.post<Array<{
|
|
118
|
+
id: number;
|
|
119
|
+
name: string;
|
|
120
|
+
name_short: string;
|
|
121
|
+
iso3166_alpha2: string;
|
|
122
|
+
}>>('/2.0/country/search', searchBody, queryParams);
|
|
123
|
+
|
|
124
|
+
return response;
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { createAction, Property, OAuth2PropertyValue } from '@agnocon/pieces-framework';
|
|
2
|
+
import { bexioAuth } from '../auth';
|
|
3
|
+
import { BexioClient } from '../common/client';
|
|
4
|
+
|
|
5
|
+
export const findPersonAction = createAction({
|
|
6
|
+
auth: bexioAuth,
|
|
7
|
+
name: 'find_person',
|
|
8
|
+
displayName: 'Find Person',
|
|
9
|
+
description: 'Search for person contacts using various criteria',
|
|
10
|
+
audience: 'both',
|
|
11
|
+
aiMetadata: { description: 'Search Bexio person contacts (contact_type 2; companies are excluded) by one or more field/operator/value criteria such as name, email, phone, or contact number. Read-only and repeatable; returns matching person records and supports ordering, limit, and offset paging. Use to look up a person before referencing them in another action; for company contacts use the company-oriented lookup instead.', idempotent: true },
|
|
12
|
+
props: {
|
|
13
|
+
search_criteria: Property.Array({
|
|
14
|
+
displayName: 'Search Criteria',
|
|
15
|
+
description: 'Search criteria for finding persons',
|
|
16
|
+
required: true,
|
|
17
|
+
properties: {
|
|
18
|
+
field: Property.StaticDropdown({
|
|
19
|
+
displayName: 'Search Field',
|
|
20
|
+
description: 'Field to search in',
|
|
21
|
+
required: true,
|
|
22
|
+
options: {
|
|
23
|
+
disabled: false,
|
|
24
|
+
options: [
|
|
25
|
+
{ label: 'ID', value: 'id' },
|
|
26
|
+
{ label: 'First Name (name_1)', value: 'name_1' },
|
|
27
|
+
{ label: 'Last Name (name_2)', value: 'name_2' },
|
|
28
|
+
{ label: 'Contact Number', value: 'nr' },
|
|
29
|
+
{ label: 'Address', value: 'address' },
|
|
30
|
+
{ label: 'Email', value: 'mail' },
|
|
31
|
+
{ label: 'Secondary Email', value: 'mail_second' },
|
|
32
|
+
{ label: 'Postcode', value: 'postcode' },
|
|
33
|
+
{ label: 'City', value: 'city' },
|
|
34
|
+
{ label: 'Country ID', value: 'country_id' },
|
|
35
|
+
{ label: 'Contact Group IDs', value: 'contact_group_ids' },
|
|
36
|
+
{ label: 'Contact Type ID', value: 'contact_type_id' },
|
|
37
|
+
{ label: 'Updated At', value: 'updated_at' },
|
|
38
|
+
{ label: 'User ID', value: 'user_id' },
|
|
39
|
+
{ label: 'Fixed Phone', value: 'phone_fixed' },
|
|
40
|
+
{ label: 'Mobile Phone', value: 'phone_mobile' },
|
|
41
|
+
{ label: 'Fax', value: 'fax' },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
value: Property.ShortText({
|
|
46
|
+
displayName: 'Search Value',
|
|
47
|
+
description: 'Value to search for',
|
|
48
|
+
required: true,
|
|
49
|
+
}),
|
|
50
|
+
criteria: Property.StaticDropdown({
|
|
51
|
+
displayName: 'Criteria',
|
|
52
|
+
description: 'Search criteria type',
|
|
53
|
+
required: false,
|
|
54
|
+
defaultValue: 'like',
|
|
55
|
+
options: {
|
|
56
|
+
disabled: false,
|
|
57
|
+
options: [
|
|
58
|
+
{ label: 'Contains (like)', value: 'like' },
|
|
59
|
+
{ label: 'Exact match (=)', value: '=' },
|
|
60
|
+
{ label: 'Exact match (equal)', value: 'equal' },
|
|
61
|
+
{ label: 'Not equal (!=)', value: '!=' },
|
|
62
|
+
{ label: 'Not equal (not_equal)', value: 'not_equal' },
|
|
63
|
+
{ label: 'Greater than (>)', value: '>' },
|
|
64
|
+
{ label: 'Greater than (greater_than)', value: 'greater_than' },
|
|
65
|
+
{ label: 'Greater or equal (>=)', value: '>=' },
|
|
66
|
+
{ label: 'Greater or equal (greater_equal)', value: 'greater_equal' },
|
|
67
|
+
{ label: 'Less than (<)', value: '<' },
|
|
68
|
+
{ label: 'Less than (less_than)', value: 'less_than' },
|
|
69
|
+
{ label: 'Less or equal (<=)', value: '<=' },
|
|
70
|
+
{ label: 'Less or equal (less_equal)', value: 'less_equal' },
|
|
71
|
+
{ label: 'Does not contain (not_like)', value: 'not_like' },
|
|
72
|
+
{ label: 'Is NULL', value: 'is_null' },
|
|
73
|
+
{ label: 'Is not NULL', value: 'not_null' },
|
|
74
|
+
{ label: 'In (array of values)', value: 'in' },
|
|
75
|
+
{ label: 'Not In (array of values)', value: 'not_in' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
order_by: Property.StaticDropdown({
|
|
82
|
+
displayName: 'Order By',
|
|
83
|
+
description: 'Field to sort the results by',
|
|
84
|
+
required: false,
|
|
85
|
+
defaultValue: 'id',
|
|
86
|
+
options: {
|
|
87
|
+
disabled: false,
|
|
88
|
+
options: [
|
|
89
|
+
{ label: 'ID', value: 'id' },
|
|
90
|
+
{ label: 'Contact Number', value: 'nr' },
|
|
91
|
+
{ label: 'First Name', value: 'name_1' },
|
|
92
|
+
{ label: 'Updated At', value: 'updated_at' },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
order_direction: Property.StaticDropdown({
|
|
97
|
+
displayName: 'Order Direction',
|
|
98
|
+
description: 'Sort order',
|
|
99
|
+
required: false,
|
|
100
|
+
defaultValue: 'asc',
|
|
101
|
+
options: {
|
|
102
|
+
disabled: false,
|
|
103
|
+
options: [
|
|
104
|
+
{ label: 'Ascending', value: 'asc' },
|
|
105
|
+
{ label: 'Descending', value: 'desc' },
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
limit: Property.Number({
|
|
110
|
+
displayName: 'Limit',
|
|
111
|
+
description: 'Maximum number of results to return (max 2000)',
|
|
112
|
+
required: false,
|
|
113
|
+
defaultValue: 500,
|
|
114
|
+
}),
|
|
115
|
+
offset: Property.Number({
|
|
116
|
+
displayName: 'Offset',
|
|
117
|
+
description: 'Number of results to skip',
|
|
118
|
+
required: false,
|
|
119
|
+
defaultValue: 0,
|
|
120
|
+
}),
|
|
121
|
+
show_archived: Property.Checkbox({
|
|
122
|
+
displayName: 'Show Archived',
|
|
123
|
+
description: 'Include archived contacts in the search results',
|
|
124
|
+
required: false,
|
|
125
|
+
defaultValue: false,
|
|
126
|
+
}),
|
|
127
|
+
},
|
|
128
|
+
async run({ auth, propsValue }) {
|
|
129
|
+
const client = new BexioClient(auth);
|
|
130
|
+
const searchCriteria = propsValue['search_criteria'] as Array<Record<string, unknown>>;
|
|
131
|
+
const orderBy = propsValue['order_by'] as string | undefined;
|
|
132
|
+
const orderDirection = propsValue['order_direction'] as string | undefined;
|
|
133
|
+
const limit = propsValue['limit'] as number | undefined;
|
|
134
|
+
const offset = propsValue['offset'] as number | undefined;
|
|
135
|
+
const showArchived = propsValue['show_archived'] as boolean | undefined;
|
|
136
|
+
|
|
137
|
+
const finalSearchBody = [...searchCriteria];
|
|
138
|
+
|
|
139
|
+
// Ensure contact_type_id is 2 (person) unless explicitly overridden by user
|
|
140
|
+
const contactTypeCriteriaIndex = finalSearchBody.findIndex(
|
|
141
|
+
(criteria) => criteria['field'] === 'contact_type_id'
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
if (contactTypeCriteriaIndex === -1) {
|
|
145
|
+
finalSearchBody.push({
|
|
146
|
+
field: 'contact_type_id',
|
|
147
|
+
value: '2',
|
|
148
|
+
criteria: '=',
|
|
149
|
+
});
|
|
150
|
+
} else if (finalSearchBody[contactTypeCriteriaIndex]['value'] !== '2') {
|
|
151
|
+
// If user provided a different contact_type_id, ensure it's 2 for "Find Person"
|
|
152
|
+
finalSearchBody[contactTypeCriteriaIndex]['value'] = '2';
|
|
153
|
+
finalSearchBody[contactTypeCriteriaIndex]['criteria'] = '=';
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const queryParams: Record<string, string> = {};
|
|
157
|
+
if (orderBy) {
|
|
158
|
+
queryParams['order_by'] = `${orderBy}${orderDirection === 'desc' ? '_desc' : ''}`;
|
|
159
|
+
}
|
|
160
|
+
if (limit !== undefined) {
|
|
161
|
+
queryParams['limit'] = limit.toString();
|
|
162
|
+
}
|
|
163
|
+
if (offset !== undefined) {
|
|
164
|
+
queryParams['offset'] = offset.toString();
|
|
165
|
+
}
|
|
166
|
+
if (showArchived !== undefined) {
|
|
167
|
+
queryParams['show_archived'] = showArchived.toString();
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const response = await client.post<Array<{
|
|
171
|
+
id: number;
|
|
172
|
+
nr?: string | null;
|
|
173
|
+
contact_type_id: number;
|
|
174
|
+
name_1: string;
|
|
175
|
+
name_2?: string | null;
|
|
176
|
+
salutation_id?: number | null;
|
|
177
|
+
salutation_form?: string | null;
|
|
178
|
+
title_id?: number | null;
|
|
179
|
+
birthday?: string | null;
|
|
180
|
+
address?: string | null;
|
|
181
|
+
street_name?: string | null;
|
|
182
|
+
house_number?: string | null;
|
|
183
|
+
address_addition?: string | null;
|
|
184
|
+
postcode?: string | null;
|
|
185
|
+
city?: string | null;
|
|
186
|
+
country_id?: number | null;
|
|
187
|
+
mail?: string | null;
|
|
188
|
+
mail_second?: string | null;
|
|
189
|
+
phone_fixed?: string | null;
|
|
190
|
+
phone_fixed_second?: string | null;
|
|
191
|
+
phone_mobile?: string | null;
|
|
192
|
+
fax?: string | null;
|
|
193
|
+
url?: string | null;
|
|
194
|
+
skype_name?: string | null;
|
|
195
|
+
remarks?: string | null;
|
|
196
|
+
language_id?: number | null;
|
|
197
|
+
is_lead?: boolean;
|
|
198
|
+
contact_group_ids?: string | null;
|
|
199
|
+
contact_branch_ids?: string | null;
|
|
200
|
+
user_id?: number;
|
|
201
|
+
owner_id?: number;
|
|
202
|
+
updated_at?: string;
|
|
203
|
+
}>>('/2.0/contact/search', finalSearchBody, queryParams);
|
|
204
|
+
|
|
205
|
+
return response;
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { createAction, Property, OAuth2PropertyValue } from '@agnocon/pieces-framework';
|
|
2
|
+
import { bexioAuth } from '../auth';
|
|
3
|
+
import { BexioClient } from '../common/client';
|
|
4
|
+
|
|
5
|
+
export const findProductAction = createAction({
|
|
6
|
+
auth: bexioAuth,
|
|
7
|
+
name: 'find_product',
|
|
8
|
+
displayName: 'Find Product',
|
|
9
|
+
description: 'Search for products by name or code',
|
|
10
|
+
audience: 'both',
|
|
11
|
+
aiMetadata: { description: 'Searches Bexio products/articles by internal name or internal code with operators such as contains or equals, with ordering and paging. Use to resolve a product to its id before referencing it on an invoice/order position or before Update Product. Read-only and idempotent.', idempotent: true },
|
|
12
|
+
props: {
|
|
13
|
+
search_criteria: Property.Array({
|
|
14
|
+
displayName: 'Search Criteria',
|
|
15
|
+
description: 'Search criteria for finding products',
|
|
16
|
+
required: true,
|
|
17
|
+
properties: {
|
|
18
|
+
field: Property.StaticDropdown({
|
|
19
|
+
displayName: 'Search Field',
|
|
20
|
+
description: 'Field to search in',
|
|
21
|
+
required: true,
|
|
22
|
+
options: {
|
|
23
|
+
disabled: false,
|
|
24
|
+
options: [
|
|
25
|
+
{ label: 'Internal Name', value: 'intern_name' },
|
|
26
|
+
{ label: 'Internal Code', value: 'intern_code' },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
value: Property.ShortText({
|
|
31
|
+
displayName: 'Search Value',
|
|
32
|
+
description: 'Value to search for',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
criteria: Property.StaticDropdown({
|
|
36
|
+
displayName: 'Criteria',
|
|
37
|
+
description: 'Search criteria type',
|
|
38
|
+
required: false,
|
|
39
|
+
defaultValue: 'like',
|
|
40
|
+
options: {
|
|
41
|
+
disabled: false,
|
|
42
|
+
options: [
|
|
43
|
+
{ label: 'Contains (like)', value: 'like' },
|
|
44
|
+
{ label: 'Exact match (=)', value: '=' },
|
|
45
|
+
{ label: 'Exact match (equal)', value: 'equal' },
|
|
46
|
+
{ label: 'Not equal (!=)', value: '!=' },
|
|
47
|
+
{ label: 'Not equal (not_equal)', value: 'not_equal' },
|
|
48
|
+
{ label: 'Greater than (>)', value: '>' },
|
|
49
|
+
{ label: 'Greater than (greater_than)', value: 'greater_than' },
|
|
50
|
+
{ label: 'Greater or equal (>=)', value: '>=' },
|
|
51
|
+
{ label: 'Greater or equal (greater_equal)', value: 'greater_equal' },
|
|
52
|
+
{ label: 'Less than (<)', value: '<' },
|
|
53
|
+
{ label: 'Less than (less_than)', value: 'less_than' },
|
|
54
|
+
{ label: 'Less or equal (<=)', value: '<=' },
|
|
55
|
+
{ label: 'Less or equal (less_equal)', value: 'less_equal' },
|
|
56
|
+
{ label: 'Does not contain (not_like)', value: 'not_like' },
|
|
57
|
+
{ label: 'Is NULL', value: 'is_null' },
|
|
58
|
+
{ label: 'Is not NULL', value: 'not_null' },
|
|
59
|
+
{ label: 'In (array)', value: 'in' },
|
|
60
|
+
{ label: 'Not in (array)', value: 'not_in' },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
},
|
|
65
|
+
}),
|
|
66
|
+
order_by: Property.StaticDropdown({
|
|
67
|
+
displayName: 'Order By',
|
|
68
|
+
description: 'Field to order results by',
|
|
69
|
+
required: false,
|
|
70
|
+
defaultValue: 'id',
|
|
71
|
+
options: {
|
|
72
|
+
disabled: false,
|
|
73
|
+
options: [
|
|
74
|
+
{ label: 'ID', value: 'id' },
|
|
75
|
+
{ label: 'Internal Name', value: 'intern_name' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
limit: Property.Number({
|
|
80
|
+
displayName: 'Limit',
|
|
81
|
+
description: 'Maximum number of results to return (max 2000)',
|
|
82
|
+
required: false,
|
|
83
|
+
defaultValue: 500,
|
|
84
|
+
}),
|
|
85
|
+
offset: Property.Number({
|
|
86
|
+
displayName: 'Offset',
|
|
87
|
+
description: 'Number of results to skip',
|
|
88
|
+
required: false,
|
|
89
|
+
defaultValue: 0,
|
|
90
|
+
}),
|
|
91
|
+
},
|
|
92
|
+
async run({ auth, propsValue }) {
|
|
93
|
+
const client = new BexioClient(auth);
|
|
94
|
+
const searchCriteria = propsValue['search_criteria'] as Array<Record<string, unknown>>;
|
|
95
|
+
const orderBy = propsValue['order_by'] as string | undefined;
|
|
96
|
+
const limit = propsValue['limit'] as number | undefined;
|
|
97
|
+
const offset = propsValue['offset'] as number | undefined;
|
|
98
|
+
|
|
99
|
+
const searchBody = searchCriteria.map((criteria) => ({
|
|
100
|
+
field: criteria['field'] as string,
|
|
101
|
+
value: criteria['value'] as string,
|
|
102
|
+
criteria: (criteria['criteria'] as string) || 'like',
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
const queryParams: Record<string, string> = {};
|
|
106
|
+
if (orderBy) {
|
|
107
|
+
queryParams['order_by'] = orderBy;
|
|
108
|
+
}
|
|
109
|
+
if (limit !== undefined) {
|
|
110
|
+
queryParams['limit'] = limit.toString();
|
|
111
|
+
}
|
|
112
|
+
if (offset !== undefined) {
|
|
113
|
+
queryParams['offset'] = offset.toString();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const response = await client.post<Array<{
|
|
117
|
+
id: number;
|
|
118
|
+
user_id: number;
|
|
119
|
+
article_type_id: number;
|
|
120
|
+
contact_id: number | null;
|
|
121
|
+
deliverer_code: string | null;
|
|
122
|
+
deliverer_name: string | null;
|
|
123
|
+
deliverer_description: string | null;
|
|
124
|
+
intern_code: string;
|
|
125
|
+
intern_name: string;
|
|
126
|
+
intern_description: string | null;
|
|
127
|
+
purchase_price: string | null;
|
|
128
|
+
sale_price: string | null;
|
|
129
|
+
purchase_total: number | null;
|
|
130
|
+
sale_total: number | null;
|
|
131
|
+
currency_id: number | null;
|
|
132
|
+
tax_income_id: number | null;
|
|
133
|
+
tax_id: number | null;
|
|
134
|
+
tax_expense_id: number | null;
|
|
135
|
+
unit_id: number | null;
|
|
136
|
+
is_stock: boolean;
|
|
137
|
+
stock_id: number | null;
|
|
138
|
+
stock_place_id: number | null;
|
|
139
|
+
stock_nr: number;
|
|
140
|
+
stock_min_nr: number;
|
|
141
|
+
stock_reserved_nr: number;
|
|
142
|
+
stock_available_nr: number;
|
|
143
|
+
stock_picked_nr: number;
|
|
144
|
+
stock_disposed_nr: number;
|
|
145
|
+
stock_ordered_nr: number;
|
|
146
|
+
width: number | null;
|
|
147
|
+
height: number | null;
|
|
148
|
+
weight: number | null;
|
|
149
|
+
volume: number | null;
|
|
150
|
+
html_text: string | null;
|
|
151
|
+
remarks: string | null;
|
|
152
|
+
delivery_price: number | null;
|
|
153
|
+
article_group_id: number | null;
|
|
154
|
+
account_id: number | null;
|
|
155
|
+
expense_account_id: number | null;
|
|
156
|
+
}>>('/2.0/article/search', searchBody, queryParams);
|
|
157
|
+
|
|
158
|
+
return response;
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
|