@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.
Files changed (182) hide show
  1. package/LICENSE.MIT-AP +24 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +93 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/actions/create-company.d.ts +28 -0
  7. package/dist/lib/actions/create-company.d.ts.map +1 -0
  8. package/dist/lib/actions/create-company.js +461 -0
  9. package/dist/lib/actions/create-company.js.map +1 -0
  10. package/dist/lib/actions/create-file.d.ts +4 -0
  11. package/dist/lib/actions/create-file.d.ts.map +1 -0
  12. package/dist/lib/actions/create-file.js +48 -0
  13. package/dist/lib/actions/create-file.js.map +1 -0
  14. package/dist/lib/actions/create-manual-entry.d.ts +7 -0
  15. package/dist/lib/actions/create-manual-entry.d.ts.map +1 -0
  16. package/dist/lib/actions/create-manual-entry.js +426 -0
  17. package/dist/lib/actions/create-manual-entry.js.map +1 -0
  18. package/dist/lib/actions/create-person.d.ts +30 -0
  19. package/dist/lib/actions/create-person.d.ts.map +1 -0
  20. package/dist/lib/actions/create-person.js +477 -0
  21. package/dist/lib/actions/create-person.js.map +1 -0
  22. package/dist/lib/actions/create-product.d.ts +34 -0
  23. package/dist/lib/actions/create-product.d.ts.map +1 -0
  24. package/dist/lib/actions/create-product.js +527 -0
  25. package/dist/lib/actions/create-product.js.map +1 -0
  26. package/dist/lib/actions/create-project.d.ts +17 -0
  27. package/dist/lib/actions/create-project.d.ts.map +1 -0
  28. package/dist/lib/actions/create-project.js +316 -0
  29. package/dist/lib/actions/create-project.js.map +1 -0
  30. package/dist/lib/actions/create-sales-invoice.d.ts +25 -0
  31. package/dist/lib/actions/create-sales-invoice.d.ts.map +1 -0
  32. package/dist/lib/actions/create-sales-invoice.js +615 -0
  33. package/dist/lib/actions/create-sales-invoice.js.map +1 -0
  34. package/dist/lib/actions/create-sales-order.d.ts +25 -0
  35. package/dist/lib/actions/create-sales-order.d.ts.map +1 -0
  36. package/dist/lib/actions/create-sales-order.js +642 -0
  37. package/dist/lib/actions/create-sales-order.js.map +1 -0
  38. package/dist/lib/actions/create-sales-quote.d.ts +28 -0
  39. package/dist/lib/actions/create-sales-quote.d.ts.map +1 -0
  40. package/dist/lib/actions/create-sales-quote.js +666 -0
  41. package/dist/lib/actions/create-sales-quote.js.map +1 -0
  42. package/dist/lib/actions/create-time-tracking.d.ts +17 -0
  43. package/dist/lib/actions/create-time-tracking.d.ts.map +1 -0
  44. package/dist/lib/actions/create-time-tracking.js +380 -0
  45. package/dist/lib/actions/create-time-tracking.js.map +1 -0
  46. package/dist/lib/actions/export-invoice-pdf.d.ts +5 -0
  47. package/dist/lib/actions/export-invoice-pdf.d.ts.map +1 -0
  48. package/dist/lib/actions/export-invoice-pdf.js +94 -0
  49. package/dist/lib/actions/export-invoice-pdf.js.map +1 -0
  50. package/dist/lib/actions/find-account.d.ts +6 -0
  51. package/dist/lib/actions/find-account.d.ts.map +1 -0
  52. package/dist/lib/actions/find-account.js +107 -0
  53. package/dist/lib/actions/find-account.js.map +1 -0
  54. package/dist/lib/actions/find-company.d.ts +8 -0
  55. package/dist/lib/actions/find-company.d.ts.map +1 -0
  56. package/dist/lib/actions/find-company.js +160 -0
  57. package/dist/lib/actions/find-company.js.map +1 -0
  58. package/dist/lib/actions/find-country.d.ts +7 -0
  59. package/dist/lib/actions/find-country.d.ts.map +1 -0
  60. package/dist/lib/actions/find-country.js +125 -0
  61. package/dist/lib/actions/find-country.js.map +1 -0
  62. package/dist/lib/actions/find-person.d.ts +9 -0
  63. package/dist/lib/actions/find-person.d.ts.map +1 -0
  64. package/dist/lib/actions/find-person.js +175 -0
  65. package/dist/lib/actions/find-person.js.map +1 -0
  66. package/dist/lib/actions/find-product.d.ts +7 -0
  67. package/dist/lib/actions/find-product.d.ts.map +1 -0
  68. package/dist/lib/actions/find-product.js +124 -0
  69. package/dist/lib/actions/find-product.js.map +1 -0
  70. package/dist/lib/actions/search-invoice.d.ts +7 -0
  71. package/dist/lib/actions/search-invoice.d.ts.map +1 -0
  72. package/dist/lib/actions/search-invoice.js +140 -0
  73. package/dist/lib/actions/search-invoice.js.map +1 -0
  74. package/dist/lib/actions/search-order.d.ts +7 -0
  75. package/dist/lib/actions/search-order.d.ts.map +1 -0
  76. package/dist/lib/actions/search-order.js +139 -0
  77. package/dist/lib/actions/search-order.js.map +1 -0
  78. package/dist/lib/actions/search-quote.d.ts +7 -0
  79. package/dist/lib/actions/search-quote.d.ts.map +1 -0
  80. package/dist/lib/actions/search-quote.js +140 -0
  81. package/dist/lib/actions/search-quote.js.map +1 -0
  82. package/dist/lib/actions/send-sales-invoice.d.ts +9 -0
  83. package/dist/lib/actions/send-sales-invoice.d.ts.map +1 -0
  84. package/dist/lib/actions/send-sales-invoice.js +110 -0
  85. package/dist/lib/actions/send-sales-invoice.js.map +1 -0
  86. package/dist/lib/actions/update-company.d.ts +29 -0
  87. package/dist/lib/actions/update-company.d.ts.map +1 -0
  88. package/dist/lib/actions/update-company.js +506 -0
  89. package/dist/lib/actions/update-company.js.map +1 -0
  90. package/dist/lib/actions/update-person.d.ts +31 -0
  91. package/dist/lib/actions/update-person.d.ts.map +1 -0
  92. package/dist/lib/actions/update-person.js +524 -0
  93. package/dist/lib/actions/update-person.js.map +1 -0
  94. package/dist/lib/actions/update-product.d.ts +34 -0
  95. package/dist/lib/actions/update-product.d.ts.map +1 -0
  96. package/dist/lib/actions/update-product.js +556 -0
  97. package/dist/lib/actions/update-product.js.map +1 -0
  98. package/dist/lib/auth.d.ts +2 -0
  99. package/dist/lib/auth.d.ts.map +1 -0
  100. package/dist/lib/auth.js +51 -0
  101. package/dist/lib/auth.js.map +1 -0
  102. package/dist/lib/common/client.d.ts +13 -0
  103. package/dist/lib/common/client.d.ts.map +1 -0
  104. package/dist/lib/common/client.js +64 -0
  105. package/dist/lib/common/client.js.map +1 -0
  106. package/dist/lib/common/index.d.ts +5 -0
  107. package/dist/lib/common/index.d.ts.map +1 -0
  108. package/dist/lib/common/index.js +10 -0
  109. package/dist/lib/common/index.js.map +1 -0
  110. package/dist/lib/common/props.d.ts +14 -0
  111. package/dist/lib/common/props.d.ts.map +1 -0
  112. package/dist/lib/common/props.js +118 -0
  113. package/dist/lib/common/props.js.map +1 -0
  114. package/dist/lib/common/types.d.ts +89 -0
  115. package/dist/lib/common/types.d.ts.map +1 -0
  116. package/dist/lib/common/types.js +6 -0
  117. package/dist/lib/common/types.js.map +1 -0
  118. package/dist/lib/triggers/new-order.d.ts +11 -0
  119. package/dist/lib/triggers/new-order.d.ts.map +1 -0
  120. package/dist/lib/triggers/new-order.js +152 -0
  121. package/dist/lib/triggers/new-order.js.map +1 -0
  122. package/dist/lib/triggers/new-product.d.ts +3 -0
  123. package/dist/lib/triggers/new-product.d.ts.map +1 -0
  124. package/dist/lib/triggers/new-product.js +111 -0
  125. package/dist/lib/triggers/new-product.js.map +1 -0
  126. package/dist/lib/triggers/new-project.d.ts +11 -0
  127. package/dist/lib/triggers/new-project.d.ts.map +1 -0
  128. package/dist/lib/triggers/new-project.js +141 -0
  129. package/dist/lib/triggers/new-project.js.map +1 -0
  130. package/dist/lib/triggers/new-quote.d.ts +11 -0
  131. package/dist/lib/triggers/new-quote.d.ts.map +1 -0
  132. package/dist/lib/triggers/new-quote.js +153 -0
  133. package/dist/lib/triggers/new-quote.js.map +1 -0
  134. package/dist/lib/triggers/new-sales-invoice.d.ts +11 -0
  135. package/dist/lib/triggers/new-sales-invoice.d.ts.map +1 -0
  136. package/dist/lib/triggers/new-sales-invoice.js +153 -0
  137. package/dist/lib/triggers/new-sales-invoice.js.map +1 -0
  138. package/dist/lib/triggers/new-updated-company.d.ts +3 -0
  139. package/dist/lib/triggers/new-updated-company.d.ts.map +1 -0
  140. package/dist/lib/triggers/new-updated-company.js +122 -0
  141. package/dist/lib/triggers/new-updated-company.js.map +1 -0
  142. package/dist/lib/triggers/new-updated-person.d.ts +3 -0
  143. package/dist/lib/triggers/new-updated-person.d.ts.map +1 -0
  144. package/dist/lib/triggers/new-updated-person.js +122 -0
  145. package/dist/lib/triggers/new-updated-person.js.map +1 -0
  146. package/package.json +48 -0
  147. package/src/index.ts +89 -0
  148. package/src/lib/actions/create-company.ts +464 -0
  149. package/src/lib/actions/create-file.ts +62 -0
  150. package/src/lib/actions/create-manual-entry.ts +445 -0
  151. package/src/lib/actions/create-person.ts +481 -0
  152. package/src/lib/actions/create-product.ts +563 -0
  153. package/src/lib/actions/create-project.ts +344 -0
  154. package/src/lib/actions/create-sales-invoice.ts +656 -0
  155. package/src/lib/actions/create-sales-order.ts +689 -0
  156. package/src/lib/actions/create-sales-quote.ts +713 -0
  157. package/src/lib/actions/create-time-tracking.ts +418 -0
  158. package/src/lib/actions/export-invoice-pdf.ts +104 -0
  159. package/src/lib/actions/find-account.ts +114 -0
  160. package/src/lib/actions/find-company.ts +193 -0
  161. package/src/lib/actions/find-country.ts +127 -0
  162. package/src/lib/actions/find-person.ts +208 -0
  163. package/src/lib/actions/find-product.ts +161 -0
  164. package/src/lib/actions/search-invoice.ts +157 -0
  165. package/src/lib/actions/search-order.ts +155 -0
  166. package/src/lib/actions/search-quote.ts +157 -0
  167. package/src/lib/actions/send-sales-invoice.ts +118 -0
  168. package/src/lib/actions/update-company.ts +518 -0
  169. package/src/lib/actions/update-person.ts +536 -0
  170. package/src/lib/actions/update-product.ts +594 -0
  171. package/src/lib/auth.ts +44 -0
  172. package/src/lib/common/client.ts +65 -0
  173. package/src/lib/common/index.ts +5 -0
  174. package/src/lib/common/props.ts +127 -0
  175. package/src/lib/common/types.ts +99 -0
  176. package/src/lib/triggers/new-order.ts +184 -0
  177. package/src/lib/triggers/new-product.ts +154 -0
  178. package/src/lib/triggers/new-project.ts +165 -0
  179. package/src/lib/triggers/new-quote.ts +186 -0
  180. package/src/lib/triggers/new-sales-invoice.ts +186 -0
  181. package/src/lib/triggers/new-updated-company.ts +161 -0
  182. package/src/lib/triggers/new-updated-person.ts +161 -0
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchQuoteAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bexio/src/lib/actions/search-quote.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../auth");
9
+ const client_1 = require("../common/client");
10
+ exports.searchQuoteAction = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.bexioAuth,
12
+ name: 'search_quote',
13
+ displayName: 'Search Quote',
14
+ description: 'Search for quotes using various criteria',
15
+ audience: 'both',
16
+ aiMetadata: { description: 'Searches Bexio quotes (offers) by one or more field criteria (document number, contact, status, totals, dates, valid-until, etc.) with operators such as contains, equals, or comparison, with ordering and paging. Use to locate quotes before referencing or following up on them; pick Search Invoice or Search Order for those document types. Read-only and idempotent.', idempotent: true },
17
+ props: {
18
+ search_criteria: pieces_framework_1.Property.Array({
19
+ displayName: 'Search Criteria',
20
+ description: 'Search criteria for finding quotes',
21
+ required: true,
22
+ properties: {
23
+ field: pieces_framework_1.Property.StaticDropdown({
24
+ displayName: 'Search Field',
25
+ description: 'Field to search in',
26
+ required: true,
27
+ options: {
28
+ disabled: false,
29
+ options: [
30
+ { label: 'ID', value: 'id' },
31
+ { label: 'Status ID', value: 'kb_item_status_id' },
32
+ { label: 'Document Number', value: 'document_nr' },
33
+ { label: 'Title', value: 'title' },
34
+ { label: 'Contact ID', value: 'contact_id' },
35
+ { label: 'Sub Contact ID', value: 'contact_sub_id' },
36
+ { label: 'User ID', value: 'user_id' },
37
+ { label: 'Currency ID', value: 'currency_id' },
38
+ { label: 'Total Gross', value: 'total_gross' },
39
+ { label: 'Total Net', value: 'total_net' },
40
+ { label: 'Total', value: 'total' },
41
+ { label: 'Valid From', value: 'is_valid_from' },
42
+ { label: 'Valid To', value: 'is_valid_to' },
43
+ { label: 'Valid Until', value: 'is_valid_until' },
44
+ { label: 'Updated At', value: 'updated_at' },
45
+ ],
46
+ },
47
+ }),
48
+ value: pieces_framework_1.Property.ShortText({
49
+ displayName: 'Search Value',
50
+ description: 'Value to search for',
51
+ required: true,
52
+ }),
53
+ criteria: pieces_framework_1.Property.StaticDropdown({
54
+ displayName: 'Criteria',
55
+ description: 'Search criteria type',
56
+ required: false,
57
+ defaultValue: 'like',
58
+ options: {
59
+ disabled: false,
60
+ options: [
61
+ { label: 'Contains (like)', value: 'like' },
62
+ { label: 'Exact match (=)', value: '=' },
63
+ { label: 'Exact match (equal)', value: 'equal' },
64
+ { label: 'Not equal (!=)', value: '!=' },
65
+ { label: 'Not equal (not_equal)', value: 'not_equal' },
66
+ { label: 'Greater than (>)', value: '>' },
67
+ { label: 'Greater than (greater_than)', value: 'greater_than' },
68
+ { label: 'Greater or equal (>=)', value: '>=' },
69
+ { label: 'Greater or equal (greater_equal)', value: 'greater_equal' },
70
+ { label: 'Less than (<)', value: '<' },
71
+ { label: 'Less than (less_than)', value: 'less_than' },
72
+ { label: 'Less or equal (<=)', value: '<=' },
73
+ { label: 'Less or equal (less_equal)', value: 'less_equal' },
74
+ { label: 'Does not contain (not_like)', value: 'not_like' },
75
+ { label: 'Is NULL', value: 'is_null' },
76
+ { label: 'Is not NULL', value: 'not_null' },
77
+ { label: 'In (array)', value: 'in' },
78
+ { label: 'Not in (array)', value: 'not_in' },
79
+ ],
80
+ },
81
+ }),
82
+ },
83
+ }),
84
+ order_by: pieces_framework_1.Property.StaticDropdown({
85
+ displayName: 'Order By',
86
+ description: 'Field to order results by',
87
+ required: false,
88
+ defaultValue: 'id',
89
+ options: {
90
+ disabled: false,
91
+ options: [
92
+ { label: 'ID', value: 'id' },
93
+ { label: 'Total', value: 'total' },
94
+ { label: 'Total Net', value: 'total_net' },
95
+ { label: 'Total Gross', value: 'total_gross' },
96
+ { label: 'Updated At', value: 'updated_at' },
97
+ ],
98
+ },
99
+ }),
100
+ limit: pieces_framework_1.Property.Number({
101
+ displayName: 'Limit',
102
+ description: 'Maximum number of results to return (max 2000)',
103
+ required: false,
104
+ defaultValue: 500,
105
+ }),
106
+ offset: pieces_framework_1.Property.Number({
107
+ displayName: 'Offset',
108
+ description: 'Number of results to skip',
109
+ required: false,
110
+ defaultValue: 0,
111
+ }),
112
+ },
113
+ run(_a) {
114
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
115
+ const client = new client_1.BexioClient(auth);
116
+ const searchCriteria = propsValue['search_criteria'];
117
+ const orderBy = propsValue['order_by'];
118
+ const limit = propsValue['limit'];
119
+ const offset = propsValue['offset'];
120
+ const searchBody = searchCriteria.map((criteria) => ({
121
+ field: criteria['field'],
122
+ value: criteria['value'],
123
+ criteria: criteria['criteria'] || 'like',
124
+ }));
125
+ const queryParams = {};
126
+ if (orderBy) {
127
+ queryParams['order_by'] = orderBy;
128
+ }
129
+ if (limit !== undefined) {
130
+ queryParams['limit'] = limit.toString();
131
+ }
132
+ if (offset !== undefined) {
133
+ queryParams['offset'] = offset.toString();
134
+ }
135
+ const response = yield client.post('/2.0/kb_offer/search', searchBody, queryParams);
136
+ return response;
137
+ });
138
+ },
139
+ });
140
+ //# sourceMappingURL=search-quote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-quote.js","sourceRoot":"","sources":["../../../src/lib/actions/search-quote.ts"],"names":[],"mappings":";;;;AAAA,oGAAoG;AACpG,qEAAqE;AACrE,gEAAmE;AACnE,kCAAoC;AACpC,6CAA+C;AAElC,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,0CAA0C;IACvD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,8WAA8W,EAAE,UAAU,EAAE,IAAI,EAAE;IAC7Z,KAAK,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ocon/pieces-framework").OAuth2Props>, {
2
+ invoice_id: import("@agnocon/pieces-framework").DropdownProperty<number, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
3
+ recipient_email: import("@agnocon/pieces-framework").ShortTextProperty<true>;
4
+ subject: import("@agnocon/pieces-framework").ShortTextProperty<true>;
5
+ message: import("@agnocon/pieces-framework").LongTextProperty<true>;
6
+ mark_as_open: import("@agnocon/pieces-framework").CheckboxProperty<false>;
7
+ attach_pdf: import("@agnocon/pieces-framework").CheckboxProperty<false>;
8
+ }>;
9
+ //# sourceMappingURL=send-sales-invoice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-sales-invoice.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/send-sales-invoice.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB;;;;;;;EAgHjC,CAAC"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendSalesInvoiceAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bexio/src/lib/actions/send-sales-invoice.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../auth");
9
+ const client_1 = require("../common/client");
10
+ exports.sendSalesInvoiceAction = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.bexioAuth,
12
+ name: 'send_sales_invoice',
13
+ displayName: 'Send Sales Invoice',
14
+ description: 'Send a sales invoice to an email address',
15
+ audience: 'both',
16
+ aiMetadata: { description: 'Emails an existing Bexio sales invoice to a recipient, with subject and message body, optionally marking the invoice as open and attaching the PDF. Use to deliver an invoice to a customer; pick Export Invoice to PDF if you only need the file. Requires the invoice id and a recipient email, and the message must contain a "[Network Link]" placeholder. Not idempotent: each call sends another email.', idempotent: false },
17
+ props: {
18
+ invoice_id: pieces_framework_1.Property.Dropdown({
19
+ auth: auth_1.bexioAuth,
20
+ displayName: 'Invoice',
21
+ description: 'Select the invoice to send',
22
+ required: true,
23
+ refreshers: [],
24
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
25
+ if (!auth) {
26
+ return {
27
+ disabled: true,
28
+ placeholder: 'Connect your Bexio account first',
29
+ options: [],
30
+ };
31
+ }
32
+ try {
33
+ const client = new client_1.BexioClient(auth);
34
+ const invoices = yield client.get('/2.0/kb_invoice');
35
+ return {
36
+ disabled: false,
37
+ options: invoices.map((invoice) => {
38
+ const label = invoice.title
39
+ ? `${invoice.document_nr} - ${invoice.title}`
40
+ : invoice.document_nr;
41
+ return {
42
+ label,
43
+ value: invoice.id,
44
+ };
45
+ }),
46
+ };
47
+ }
48
+ catch (error) {
49
+ return {
50
+ disabled: true,
51
+ placeholder: 'Failed to load invoices',
52
+ options: [],
53
+ };
54
+ }
55
+ }),
56
+ }),
57
+ recipient_email: pieces_framework_1.Property.ShortText({
58
+ displayName: 'Recipient Email',
59
+ description: 'Email address to send the invoice to',
60
+ required: true,
61
+ }),
62
+ subject: pieces_framework_1.Property.ShortText({
63
+ displayName: 'Subject',
64
+ description: 'Email subject line',
65
+ required: true,
66
+ }),
67
+ message: pieces_framework_1.Property.LongText({
68
+ displayName: 'Message',
69
+ description: 'Email message body. Must include "[Network Link]" placeholder',
70
+ required: true,
71
+ }),
72
+ mark_as_open: pieces_framework_1.Property.Checkbox({
73
+ displayName: 'Mark as Open',
74
+ description: 'Mark the invoice as open',
75
+ required: false,
76
+ defaultValue: false,
77
+ }),
78
+ attach_pdf: pieces_framework_1.Property.Checkbox({
79
+ displayName: 'Attach PDF',
80
+ description: 'Attach PDF directly to the email',
81
+ required: false,
82
+ defaultValue: false,
83
+ }),
84
+ },
85
+ run(_a) {
86
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
87
+ const client = new client_1.BexioClient(auth);
88
+ const invoiceId = propsValue['invoice_id'];
89
+ const recipientEmail = propsValue['recipient_email'];
90
+ const subject = propsValue['subject'];
91
+ const message = propsValue['message'];
92
+ const markAsOpen = propsValue['mark_as_open'];
93
+ const attachPdf = propsValue['attach_pdf'];
94
+ const requestBody = {
95
+ recipient_email: recipientEmail,
96
+ subject,
97
+ message,
98
+ };
99
+ if (markAsOpen !== undefined) {
100
+ requestBody['mark_as_open'] = markAsOpen;
101
+ }
102
+ if (attachPdf !== undefined) {
103
+ requestBody['attach_pdf'] = attachPdf;
104
+ }
105
+ const response = yield client.post(`/2.0/kb_invoice/${invoiceId}/send`, requestBody);
106
+ return response;
107
+ });
108
+ },
109
+ });
110
+ //# sourceMappingURL=send-sales-invoice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-sales-invoice.js","sourceRoot":"","sources":["../../../src/lib/actions/send-sales-invoice.ts"],"names":[],"mappings":";;;;AAAA,0GAA0G;AAC1G,qEAAqE;AACrE,gEAAwF;AACxF,kCAAoC;AACpC,6CAA+C;AAElC,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,0CAA0C;IACvD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,+YAA+Y,EAAE,UAAU,EAAE,KAAK,EAAE;IAC/b,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,IAAI,EAAE,gBAAS;YACf,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,IAAI;YACd,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,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OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>, {
2
+ contact_id: import("@agnocon/pieces-framework").DropdownProperty<number, true, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
3
+ name_1: import("@agnocon/pieces-framework").ShortTextProperty<false>;
4
+ name_2: import("@agnocon/pieces-framework").ShortTextProperty<false>;
5
+ nr: import("@agnocon/pieces-framework").ShortTextProperty<false>;
6
+ salutation_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
7
+ title_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
8
+ street_name: import("@agnocon/pieces-framework").ShortTextProperty<false>;
9
+ house_number: import("@agnocon/pieces-framework").ShortTextProperty<false>;
10
+ address_addition: import("@agnocon/pieces-framework").ShortTextProperty<false>;
11
+ postcode: import("@agnocon/pieces-framework").ShortTextProperty<false>;
12
+ city: import("@agnocon/pieces-framework").ShortTextProperty<false>;
13
+ country_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
14
+ mail: import("@agnocon/pieces-framework").ShortTextProperty<false>;
15
+ mail_second: import("@agnocon/pieces-framework").ShortTextProperty<false>;
16
+ phone_fixed: import("@agnocon/pieces-framework").ShortTextProperty<false>;
17
+ phone_fixed_second: import("@agnocon/pieces-framework").ShortTextProperty<false>;
18
+ phone_mobile: import("@agnocon/pieces-framework").ShortTextProperty<false>;
19
+ fax: import("@agnocon/pieces-framework").ShortTextProperty<false>;
20
+ url: import("@agnocon/pieces-framework").ShortTextProperty<false>;
21
+ skype_name: import("@agnocon/pieces-framework").ShortTextProperty<false>;
22
+ remarks: import("@agnocon/pieces-framework").LongTextProperty<false>;
23
+ language_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
24
+ contact_group_ids: import("@agnocon/pieces-framework").MultiSelectDropdownProperty<string, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
25
+ contact_branch_ids: import("@agnocon/pieces-framework").MultiSelectDropdownProperty<string, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
26
+ user_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
27
+ owner_id: import("@agnocon/pieces-framework").DropdownProperty<number, false, import("@agnocon/pieces-framework").OAuth2Property<import("@agnocon/pieces-framework").OAuth2Props>>;
28
+ }>;
29
+ //# sourceMappingURL=update-company.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-company.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/update-company.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAggB9B,CAAC"}