@activepieces/piece-bexio 0.1.4 → 0.1.6

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.
Files changed (107) hide show
  1. package/package.json +7 -23
  2. package/src/index.js +13 -133
  3. package/README.md +0 -7
  4. package/src/index.d.ts +0 -2
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-company.d.ts +0 -27
  7. package/src/lib/actions/create-company.js +0 -457
  8. package/src/lib/actions/create-company.js.map +0 -1
  9. package/src/lib/actions/create-file.d.ts +0 -3
  10. package/src/lib/actions/create-file.js +0 -44
  11. package/src/lib/actions/create-file.js.map +0 -1
  12. package/src/lib/actions/create-manual-entry.d.ts +0 -6
  13. package/src/lib/actions/create-manual-entry.js +0 -422
  14. package/src/lib/actions/create-manual-entry.js.map +0 -1
  15. package/src/lib/actions/create-person.d.ts +0 -29
  16. package/src/lib/actions/create-person.js +0 -473
  17. package/src/lib/actions/create-person.js.map +0 -1
  18. package/src/lib/actions/create-product.d.ts +0 -33
  19. package/src/lib/actions/create-product.js +0 -523
  20. package/src/lib/actions/create-product.js.map +0 -1
  21. package/src/lib/actions/create-project.d.ts +0 -16
  22. package/src/lib/actions/create-project.js +0 -312
  23. package/src/lib/actions/create-project.js.map +0 -1
  24. package/src/lib/actions/create-sales-invoice.d.ts +0 -24
  25. package/src/lib/actions/create-sales-invoice.js +0 -611
  26. package/src/lib/actions/create-sales-invoice.js.map +0 -1
  27. package/src/lib/actions/create-sales-order.d.ts +0 -24
  28. package/src/lib/actions/create-sales-order.js +0 -638
  29. package/src/lib/actions/create-sales-order.js.map +0 -1
  30. package/src/lib/actions/create-sales-quote.d.ts +0 -27
  31. package/src/lib/actions/create-sales-quote.js +0 -662
  32. package/src/lib/actions/create-sales-quote.js.map +0 -1
  33. package/src/lib/actions/create-time-tracking.d.ts +0 -16
  34. package/src/lib/actions/create-time-tracking.js +0 -376
  35. package/src/lib/actions/create-time-tracking.js.map +0 -1
  36. package/src/lib/actions/export-invoice-pdf.d.ts +0 -4
  37. package/src/lib/actions/export-invoice-pdf.js +0 -90
  38. package/src/lib/actions/export-invoice-pdf.js.map +0 -1
  39. package/src/lib/actions/find-account.d.ts +0 -5
  40. package/src/lib/actions/find-account.js +0 -103
  41. package/src/lib/actions/find-account.js.map +0 -1
  42. package/src/lib/actions/find-company.d.ts +0 -7
  43. package/src/lib/actions/find-company.js +0 -156
  44. package/src/lib/actions/find-company.js.map +0 -1
  45. package/src/lib/actions/find-country.d.ts +0 -6
  46. package/src/lib/actions/find-country.js +0 -121
  47. package/src/lib/actions/find-country.js.map +0 -1
  48. package/src/lib/actions/find-person.d.ts +0 -8
  49. package/src/lib/actions/find-person.js +0 -171
  50. package/src/lib/actions/find-person.js.map +0 -1
  51. package/src/lib/actions/find-product.d.ts +0 -6
  52. package/src/lib/actions/find-product.js +0 -120
  53. package/src/lib/actions/find-product.js.map +0 -1
  54. package/src/lib/actions/search-invoice.d.ts +0 -6
  55. package/src/lib/actions/search-invoice.js +0 -136
  56. package/src/lib/actions/search-invoice.js.map +0 -1
  57. package/src/lib/actions/search-order.d.ts +0 -6
  58. package/src/lib/actions/search-order.js +0 -135
  59. package/src/lib/actions/search-order.js.map +0 -1
  60. package/src/lib/actions/search-quote.d.ts +0 -6
  61. package/src/lib/actions/search-quote.js +0 -136
  62. package/src/lib/actions/search-quote.js.map +0 -1
  63. package/src/lib/actions/send-sales-invoice.d.ts +0 -8
  64. package/src/lib/actions/send-sales-invoice.js +0 -106
  65. package/src/lib/actions/send-sales-invoice.js.map +0 -1
  66. package/src/lib/actions/update-company.d.ts +0 -28
  67. package/src/lib/actions/update-company.js +0 -502
  68. package/src/lib/actions/update-company.js.map +0 -1
  69. package/src/lib/actions/update-person.d.ts +0 -30
  70. package/src/lib/actions/update-person.js +0 -520
  71. package/src/lib/actions/update-person.js.map +0 -1
  72. package/src/lib/actions/update-product.d.ts +0 -33
  73. package/src/lib/actions/update-product.js +0 -552
  74. package/src/lib/actions/update-product.js.map +0 -1
  75. package/src/lib/common/client.d.ts +0 -12
  76. package/src/lib/common/client.js +0 -62
  77. package/src/lib/common/client.js.map +0 -1
  78. package/src/lib/common/index.d.ts +0 -4
  79. package/src/lib/common/index.js +0 -8
  80. package/src/lib/common/index.js.map +0 -1
  81. package/src/lib/common/props.d.ts +0 -13
  82. package/src/lib/common/props.js +0 -116
  83. package/src/lib/common/props.js.map +0 -1
  84. package/src/lib/common/types.d.ts +0 -88
  85. package/src/lib/common/types.js +0 -4
  86. package/src/lib/common/types.js.map +0 -1
  87. package/src/lib/triggers/new-order.d.ts +0 -10
  88. package/src/lib/triggers/new-order.js +0 -147
  89. package/src/lib/triggers/new-order.js.map +0 -1
  90. package/src/lib/triggers/new-product.d.ts +0 -2
  91. package/src/lib/triggers/new-product.js +0 -106
  92. package/src/lib/triggers/new-product.js.map +0 -1
  93. package/src/lib/triggers/new-project.d.ts +0 -10
  94. package/src/lib/triggers/new-project.js +0 -136
  95. package/src/lib/triggers/new-project.js.map +0 -1
  96. package/src/lib/triggers/new-quote.d.ts +0 -10
  97. package/src/lib/triggers/new-quote.js +0 -148
  98. package/src/lib/triggers/new-quote.js.map +0 -1
  99. package/src/lib/triggers/new-sales-invoice.d.ts +0 -10
  100. package/src/lib/triggers/new-sales-invoice.js +0 -148
  101. package/src/lib/triggers/new-sales-invoice.js.map +0 -1
  102. package/src/lib/triggers/new-updated-company.d.ts +0 -2
  103. package/src/lib/triggers/new-updated-company.js +0 -117
  104. package/src/lib/triggers/new-updated-company.js.map +0 -1
  105. package/src/lib/triggers/new-updated-person.d.ts +0 -2
  106. package/src/lib/triggers/new-updated-person.js +0 -117
  107. package/src/lib/triggers/new-updated-person.js.map +0 -1
@@ -1,611 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createSalesInvoiceAction = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const index_1 = require("../../index");
7
- const client_1 = require("../common/client");
8
- const props_1 = require("../common/props");
9
- exports.createSalesInvoiceAction = (0, pieces_framework_1.createAction)({
10
- auth: index_1.bexioAuth,
11
- name: 'create_sales_invoice',
12
- displayName: 'Create Sales Invoice',
13
- description: 'Create a new product-based sales invoice',
14
- props: {
15
- document_nr: pieces_framework_1.Property.ShortText({
16
- displayName: 'Document Number',
17
- description: 'Invoice number (required if automatic numbering is disabled)',
18
- required: false,
19
- }),
20
- title: pieces_framework_1.Property.ShortText({
21
- displayName: 'Title',
22
- description: 'Invoice title',
23
- required: false,
24
- }),
25
- contact_id: pieces_framework_1.Property.Dropdown({
26
- auth: index_1.bexioAuth,
27
- displayName: 'Contact',
28
- description: 'The contact for this invoice',
29
- required: false,
30
- refreshers: [],
31
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
32
- if (!auth) {
33
- return {
34
- disabled: true,
35
- placeholder: 'Connect your Bexio account first',
36
- options: [],
37
- };
38
- }
39
- try {
40
- const client = new client_1.BexioClient(auth);
41
- const contacts = yield client.get('/2.0/contact');
42
- return {
43
- disabled: false,
44
- options: contacts.map((contact) => {
45
- const name = contact.name_2
46
- ? `${contact.name_2} ${contact.name_1}`
47
- : contact.name_1;
48
- const label = contact.nr ? `${name} (#${contact.nr})` : name;
49
- return {
50
- label,
51
- value: contact.id,
52
- };
53
- }),
54
- };
55
- }
56
- catch (error) {
57
- return {
58
- disabled: true,
59
- placeholder: 'Failed to load contacts',
60
- options: [],
61
- };
62
- }
63
- }),
64
- }),
65
- contact_sub_id: pieces_framework_1.Property.Dropdown({
66
- auth: index_1.bexioAuth,
67
- displayName: 'Contact Sub',
68
- description: 'Contact sub-address (optional)',
69
- required: false,
70
- refreshers: [],
71
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
72
- if (!auth) {
73
- return {
74
- disabled: true,
75
- placeholder: 'Connect your Bexio account first',
76
- options: [],
77
- };
78
- }
79
- try {
80
- const client = new client_1.BexioClient(auth);
81
- const contacts = yield client.get('/2.0/contact');
82
- return {
83
- disabled: false,
84
- options: contacts.map((contact) => {
85
- const name = contact.name_2
86
- ? `${contact.name_2} ${contact.name_1}`
87
- : contact.name_1;
88
- const label = contact.nr ? `${name} (#${contact.nr})` : name;
89
- return {
90
- label,
91
- value: contact.id,
92
- };
93
- }),
94
- };
95
- }
96
- catch (error) {
97
- return {
98
- disabled: true,
99
- placeholder: 'Failed to load contacts',
100
- options: [],
101
- };
102
- }
103
- }),
104
- }),
105
- user_id: pieces_framework_1.Property.Dropdown({
106
- auth: index_1.bexioAuth,
107
- displayName: 'User',
108
- description: 'User assigned to this invoice',
109
- required: true,
110
- refreshers: [],
111
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
112
- if (!auth) {
113
- return {
114
- disabled: true,
115
- placeholder: 'Connect your Bexio account first',
116
- options: [],
117
- };
118
- }
119
- try {
120
- const client = new client_1.BexioClient(auth);
121
- const users = yield client.get('/3.0/users');
122
- return {
123
- disabled: false,
124
- options: users.map((user) => ({
125
- label: `${user.firstname || ''} ${user.lastname || ''}`.trim() || user.email,
126
- value: user.id,
127
- })),
128
- };
129
- }
130
- catch (error) {
131
- return {
132
- disabled: true,
133
- placeholder: 'Failed to load users',
134
- options: [],
135
- };
136
- }
137
- }),
138
- }),
139
- pr_project_id: pieces_framework_1.Property.Dropdown({
140
- auth: index_1.bexioAuth,
141
- displayName: 'Project',
142
- description: 'Project associated with this invoice',
143
- required: false,
144
- refreshers: [],
145
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
146
- if (!auth) {
147
- return {
148
- disabled: true,
149
- placeholder: 'Connect your Bexio account first',
150
- options: [],
151
- };
152
- }
153
- try {
154
- const client = new client_1.BexioClient(auth);
155
- const projects = yield client.get('/2.0/pr_project');
156
- return {
157
- disabled: false,
158
- options: projects.map((project) => ({
159
- label: project.nr ? `${project.name} (#${project.nr})` : project.name,
160
- value: project.id,
161
- })),
162
- };
163
- }
164
- catch (error) {
165
- return {
166
- disabled: true,
167
- placeholder: 'Failed to load projects',
168
- options: [],
169
- };
170
- }
171
- }),
172
- }),
173
- language_id: pieces_framework_1.Property.Dropdown({
174
- auth: index_1.bexioAuth,
175
- displayName: 'Language',
176
- description: 'Language for the invoice',
177
- required: true,
178
- refreshers: [],
179
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
180
- if (!auth) {
181
- return {
182
- disabled: true,
183
- placeholder: 'Connect your Bexio account first',
184
- options: [],
185
- };
186
- }
187
- try {
188
- const client = new client_1.BexioClient(auth);
189
- const languages = yield client.get('/2.0/language');
190
- return {
191
- disabled: false,
192
- options: languages.map((lang) => ({
193
- label: lang.name,
194
- value: lang.id,
195
- })),
196
- };
197
- }
198
- catch (error) {
199
- return {
200
- disabled: true,
201
- placeholder: 'Failed to load languages',
202
- options: [],
203
- };
204
- }
205
- }),
206
- }),
207
- bank_account_id: pieces_framework_1.Property.Dropdown({
208
- auth: index_1.bexioAuth,
209
- displayName: 'Bank Account',
210
- description: 'Bank account for payment',
211
- required: true,
212
- refreshers: [],
213
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
214
- if (!auth) {
215
- return {
216
- disabled: true,
217
- placeholder: 'Connect your Bexio account first',
218
- options: [],
219
- };
220
- }
221
- try {
222
- const client = new client_1.BexioClient(auth);
223
- const bankAccounts = yield client.get('/3.0/banking/accounts');
224
- return {
225
- disabled: false,
226
- options: bankAccounts.map((account) => {
227
- const iban = account.iban_nr || account.bank_account_nr;
228
- return {
229
- label: iban ? `${account.name} (${iban})` : account.name,
230
- value: account.id,
231
- };
232
- }),
233
- };
234
- }
235
- catch (error) {
236
- return {
237
- disabled: true,
238
- placeholder: 'Failed to load bank accounts',
239
- options: [],
240
- };
241
- }
242
- }),
243
- }),
244
- currency_id: props_1.bexioCommonProps.currency({
245
- displayName: 'Currency',
246
- required: true,
247
- }),
248
- payment_type_id: pieces_framework_1.Property.Dropdown({
249
- auth: index_1.bexioAuth,
250
- displayName: 'Payment Type',
251
- description: 'Payment type for this invoice',
252
- required: true,
253
- refreshers: [],
254
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
255
- if (!auth) {
256
- return {
257
- disabled: true,
258
- placeholder: 'Connect your Bexio account first',
259
- options: [],
260
- };
261
- }
262
- try {
263
- const client = new client_1.BexioClient(auth);
264
- const paymentTypes = yield client.get('/2.0/payment_type');
265
- return {
266
- disabled: false,
267
- options: paymentTypes.map((type) => ({
268
- label: type.name,
269
- value: type.id,
270
- })),
271
- };
272
- }
273
- catch (error) {
274
- return {
275
- disabled: true,
276
- placeholder: 'Failed to load payment types',
277
- options: [],
278
- };
279
- }
280
- }),
281
- }),
282
- header: pieces_framework_1.Property.LongText({
283
- displayName: 'Header',
284
- description: 'Header text for the invoice',
285
- required: false,
286
- }),
287
- footer: pieces_framework_1.Property.LongText({
288
- displayName: 'Footer',
289
- description: 'Footer text for the invoice',
290
- required: false,
291
- }),
292
- mwst_type: pieces_framework_1.Property.StaticDropdown({
293
- displayName: 'Tax Type',
294
- description: 'How taxes are handled',
295
- required: true,
296
- defaultValue: 0,
297
- options: {
298
- disabled: false,
299
- options: [
300
- { label: 'Including taxes', value: 0 },
301
- { label: 'Excluding taxes', value: 1 },
302
- { label: 'Exempt from taxes', value: 2 },
303
- ],
304
- },
305
- }),
306
- mwst_is_net: pieces_framework_1.Property.Checkbox({
307
- displayName: 'Tax is Net',
308
- description: 'If taxes are included, set to true to add taxes to total, false to include in total',
309
- required: false,
310
- defaultValue: false,
311
- }),
312
- show_position_taxes: pieces_framework_1.Property.Checkbox({
313
- displayName: 'Show Position Taxes',
314
- description: 'Show taxes for each position',
315
- required: false,
316
- defaultValue: false,
317
- }),
318
- is_valid_from: pieces_framework_1.Property.ShortText({
319
- displayName: 'Valid From',
320
- description: 'Invoice valid from date (YYYY-MM-DD)',
321
- required: false,
322
- }),
323
- is_valid_to: pieces_framework_1.Property.ShortText({
324
- displayName: 'Valid To',
325
- description: 'Invoice valid to date (YYYY-MM-DD)',
326
- required: false,
327
- }),
328
- contact_address_manual: pieces_framework_1.Property.LongText({
329
- displayName: 'Manual Contact Address',
330
- description: 'Override contact address (leave empty to use contact address)',
331
- required: false,
332
- }),
333
- reference: pieces_framework_1.Property.ShortText({
334
- displayName: 'Reference',
335
- description: 'Reference number',
336
- required: false,
337
- }),
338
- api_reference: pieces_framework_1.Property.ShortText({
339
- displayName: 'API Reference',
340
- description: 'Reference for API use (can only be edited via API)',
341
- required: false,
342
- }),
343
- template_slug: pieces_framework_1.Property.Dropdown({
344
- auth: index_1.bexioAuth,
345
- displayName: 'Document Template',
346
- description: 'Document template for the invoice',
347
- required: false,
348
- refreshers: [],
349
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
350
- if (!auth) {
351
- return {
352
- disabled: true,
353
- placeholder: 'Connect your Bexio account first',
354
- options: [],
355
- };
356
- }
357
- try {
358
- const client = new client_1.BexioClient(auth);
359
- const templates = yield client.get('/3.0/document_templates');
360
- return {
361
- disabled: false,
362
- options: templates.map((template) => ({
363
- label: template.is_default ? `${template.name} (Default)` : template.name,
364
- value: template.template_slug,
365
- })),
366
- };
367
- }
368
- catch (error) {
369
- return {
370
- disabled: true,
371
- placeholder: 'Failed to load templates',
372
- options: [],
373
- };
374
- }
375
- }),
376
- }),
377
- positionFields: pieces_framework_1.Property.DynamicProperties({
378
- auth: index_1.bexioAuth,
379
- displayName: 'Invoice Positions',
380
- description: 'Configure invoice line items',
381
- required: true,
382
- refreshers: ['auth'],
383
- props: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
384
- let units = [];
385
- let accounts = [];
386
- let taxes = [];
387
- if (auth) {
388
- try {
389
- const client = new client_1.BexioClient(auth);
390
- units = yield client.get('/2.0/unit').catch(() => []);
391
- accounts = yield client.get('/accounts').catch(() => []);
392
- const taxesResponse = yield client.get('/3.0/taxes?types=sales_tax&scope=active').catch(() => []);
393
- taxes = taxesResponse.map((tax) => ({
394
- id: tax.id,
395
- name: tax.display_name || tax.name,
396
- percentage: tax.value.toString(),
397
- }));
398
- }
399
- catch (error) {
400
- // Ignore error, use empty array as fallback
401
- }
402
- }
403
- const unitOptions = units.map((unit) => ({ label: unit.name, value: unit.id }));
404
- const accountOptions = accounts.map((acc) => ({ label: `${acc.account_no} - ${acc.name}`, value: acc.id }));
405
- const taxOptions = taxes.map((tax) => ({ label: `${tax.name} (${tax.percentage}%)`, value: tax.id }));
406
- return {
407
- positions: pieces_framework_1.Property.Array({
408
- displayName: 'Positions',
409
- description: 'Invoice line items',
410
- required: true,
411
- properties: {
412
- type: pieces_framework_1.Property.StaticDropdown({
413
- displayName: 'Position Type',
414
- description: 'Type of invoice position',
415
- required: true,
416
- defaultValue: 'KbPositionCustom',
417
- options: {
418
- disabled: false,
419
- options: [
420
- { label: 'Custom Position', value: 'KbPositionCustom' },
421
- { label: 'Article Position', value: 'KbPositionArticle' },
422
- { label: 'Text Position', value: 'KbPositionText' },
423
- { label: 'Subtotal Position', value: 'KbPositionSubtotal' },
424
- { label: 'Page Break Position', value: 'KbPositionPagebreak' },
425
- { label: 'Discount Position', value: 'KbPositionDiscount' },
426
- ],
427
- },
428
- }),
429
- amount: pieces_framework_1.Property.ShortText({
430
- displayName: 'Amount',
431
- description: 'Quantity/amount',
432
- required: true,
433
- }),
434
- unit_id: unitOptions.length > 0
435
- ? pieces_framework_1.Property.StaticDropdown({
436
- displayName: 'Unit',
437
- description: 'Unit of measurement',
438
- required: false,
439
- options: {
440
- disabled: false,
441
- options: unitOptions,
442
- },
443
- })
444
- : pieces_framework_1.Property.Number({
445
- displayName: 'Unit ID',
446
- description: 'Unit ID (use List Units action to find IDs)',
447
- required: false,
448
- }),
449
- account_id: accountOptions.length > 0
450
- ? pieces_framework_1.Property.StaticDropdown({
451
- displayName: 'Account',
452
- description: 'Account for this position',
453
- required: false,
454
- options: {
455
- disabled: false,
456
- options: accountOptions,
457
- },
458
- })
459
- : pieces_framework_1.Property.Number({
460
- displayName: 'Account ID',
461
- description: 'Account ID (use List Accounts action to find IDs)',
462
- required: false,
463
- }),
464
- tax_id: taxOptions.length > 0
465
- ? pieces_framework_1.Property.StaticDropdown({
466
- displayName: 'Tax',
467
- description: 'Tax rate (only active sales taxes)',
468
- required: false,
469
- options: {
470
- disabled: false,
471
- options: taxOptions,
472
- },
473
- })
474
- : pieces_framework_1.Property.Number({
475
- displayName: 'Tax ID',
476
- description: 'Tax ID (use List Taxes action to find IDs)',
477
- required: false,
478
- }),
479
- text: pieces_framework_1.Property.LongText({
480
- displayName: 'Description',
481
- description: 'Position description/text',
482
- required: false,
483
- }),
484
- unit_price: pieces_framework_1.Property.ShortText({
485
- displayName: 'Unit Price',
486
- description: 'Price per unit (max 6 decimals)',
487
- required: false,
488
- }),
489
- discount_in_percent: pieces_framework_1.Property.ShortText({
490
- displayName: 'Discount (%)',
491
- description: 'Discount percentage (max 6 decimals)',
492
- required: false,
493
- }),
494
- parent_id: pieces_framework_1.Property.Number({
495
- displayName: 'Parent ID',
496
- description: 'Parent position ID (for grouped positions)',
497
- required: false,
498
- }),
499
- },
500
- }),
501
- };
502
- }),
503
- }),
504
- },
505
- run(context) {
506
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
507
- const client = new client_1.BexioClient(context.auth);
508
- const props = context.propsValue;
509
- const requestBody = {};
510
- if (props['user_id']) {
511
- requestBody['user_id'] = props['user_id'];
512
- }
513
- if (props['language_id']) {
514
- requestBody['language_id'] = props['language_id'];
515
- }
516
- if (props['bank_account_id']) {
517
- requestBody['bank_account_id'] = props['bank_account_id'];
518
- }
519
- if (props['currency_id']) {
520
- requestBody['currency_id'] = props['currency_id'];
521
- }
522
- if (props['payment_type_id']) {
523
- requestBody['payment_type_id'] = props['payment_type_id'];
524
- }
525
- if (props['document_nr']) {
526
- requestBody['document_nr'] = props['document_nr'];
527
- }
528
- if (props['title'] !== undefined) {
529
- requestBody['title'] = props['title'] || null;
530
- }
531
- if (props['contact_id']) {
532
- requestBody['contact_id'] = props['contact_id'];
533
- }
534
- if (props['contact_sub_id']) {
535
- requestBody['contact_sub_id'] = props['contact_sub_id'];
536
- }
537
- if (props['pr_project_id']) {
538
- requestBody['pr_project_id'] = props['pr_project_id'];
539
- }
540
- if (props['header']) {
541
- requestBody['header'] = props['header'];
542
- }
543
- if (props['footer']) {
544
- requestBody['footer'] = props['footer'];
545
- }
546
- if (props['mwst_type'] !== undefined) {
547
- requestBody['mwst_type'] = props['mwst_type'];
548
- }
549
- if (props['mwst_is_net'] !== undefined) {
550
- requestBody['mwst_is_net'] = props['mwst_is_net'];
551
- }
552
- if (props['show_position_taxes'] !== undefined) {
553
- requestBody['show_position_taxes'] = props['show_position_taxes'];
554
- }
555
- if (props['is_valid_from']) {
556
- requestBody['is_valid_from'] = props['is_valid_from'];
557
- }
558
- if (props['is_valid_to']) {
559
- requestBody['is_valid_to'] = props['is_valid_to'];
560
- }
561
- if (props['contact_address_manual']) {
562
- requestBody['contact_address_manual'] = props['contact_address_manual'];
563
- }
564
- if (props['reference']) {
565
- requestBody['reference'] = props['reference'];
566
- }
567
- if (props['api_reference']) {
568
- requestBody['api_reference'] = props['api_reference'];
569
- }
570
- if (props['template_slug']) {
571
- requestBody['template_slug'] = props['template_slug'];
572
- }
573
- const positionFields = props['positionFields'];
574
- if (positionFields && positionFields['positions'] && Array.isArray(positionFields['positions'])) {
575
- requestBody['positions'] = positionFields['positions'].map((position) => {
576
- const pos = {
577
- type: position['type'] || 'KbPositionCustom',
578
- };
579
- if (position['amount']) {
580
- pos['amount'] = position['amount'];
581
- }
582
- if (position['unit_id']) {
583
- pos['unit_id'] = position['unit_id'];
584
- }
585
- if (position['account_id']) {
586
- pos['account_id'] = position['account_id'];
587
- }
588
- if (position['tax_id']) {
589
- pos['tax_id'] = position['tax_id'];
590
- }
591
- if (position['text']) {
592
- pos['text'] = position['text'];
593
- }
594
- if (position['unit_price']) {
595
- pos['unit_price'] = position['unit_price'];
596
- }
597
- if (position['discount_in_percent']) {
598
- pos['discount_in_percent'] = position['discount_in_percent'];
599
- }
600
- if (position['parent_id']) {
601
- pos['parent_id'] = position['parent_id'];
602
- }
603
- return pos;
604
- });
605
- }
606
- const response = yield client.post('/2.0/kb_invoice', requestBody);
607
- return response;
608
- });
609
- },
610
- });
611
- //# sourceMappingURL=create-sales-invoice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-sales-invoice.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/bexio/src/lib/actions/create-sales-invoice.ts"],"names":[],"mappings":";;;;AAAA,qEAA6F;AAC7F,uCAAwC;AACxC,6CAA+C;AAC/C,2CAAmD;AAEtC,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,iBAAS;IACf,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,0CAA0C;IACvD,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,8DAA8D;YAC3E,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,IAAI,EAAE,iBAAS;YACf,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,KAAK;YACf,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;wBAC/C,OAAO,EAAE,EAAE;q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