@keystrokehq/finmei 0.1.0 → 0.1.1

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 (199) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/create-expense.cjs +7 -7
  4. package/dist/actions/create-expense.cjs.map +1 -1
  5. package/dist/actions/create-expense.d.cts +43 -3
  6. package/dist/actions/create-expense.d.cts.map +1 -1
  7. package/dist/actions/create-expense.d.mts +43 -3
  8. package/dist/actions/create-expense.d.mts.map +1 -1
  9. package/dist/actions/create-expense.mjs +7 -7
  10. package/dist/actions/create-expense.mjs.map +1 -1
  11. package/dist/actions/create-invoice.cjs +63 -63
  12. package/dist/actions/create-invoice.cjs.map +1 -1
  13. package/dist/actions/create-invoice.d.cts +235 -3
  14. package/dist/actions/create-invoice.d.cts.map +1 -1
  15. package/dist/actions/create-invoice.d.mts +235 -3
  16. package/dist/actions/create-invoice.d.mts.map +1 -1
  17. package/dist/actions/create-invoice.mjs +63 -63
  18. package/dist/actions/create-invoice.mjs.map +1 -1
  19. package/dist/actions/delete-customer.cjs.map +1 -1
  20. package/dist/actions/delete-customer.d.cts +7 -3
  21. package/dist/actions/delete-customer.d.cts.map +1 -1
  22. package/dist/actions/delete-customer.d.mts +7 -3
  23. package/dist/actions/delete-customer.d.mts.map +1 -1
  24. package/dist/actions/delete-customer.mjs.map +1 -1
  25. package/dist/actions/delete-invoice.cjs +2 -2
  26. package/dist/actions/delete-invoice.cjs.map +1 -1
  27. package/dist/actions/delete-invoice.d.cts +13 -3
  28. package/dist/actions/delete-invoice.d.cts.map +1 -1
  29. package/dist/actions/delete-invoice.d.mts +13 -3
  30. package/dist/actions/delete-invoice.d.mts.map +1 -1
  31. package/dist/actions/delete-invoice.mjs +2 -2
  32. package/dist/actions/delete-invoice.mjs.map +1 -1
  33. package/dist/actions/delete-payment.cjs +1 -1
  34. package/dist/actions/delete-payment.cjs.map +1 -1
  35. package/dist/actions/delete-payment.d.cts +11 -3
  36. package/dist/actions/delete-payment.d.cts.map +1 -1
  37. package/dist/actions/delete-payment.d.mts +11 -3
  38. package/dist/actions/delete-payment.d.mts.map +1 -1
  39. package/dist/actions/delete-payment.mjs +1 -1
  40. package/dist/actions/delete-payment.mjs.map +1 -1
  41. package/dist/actions/delete-product.cjs +2 -2
  42. package/dist/actions/delete-product.cjs.map +1 -1
  43. package/dist/actions/delete-product.d.cts +13 -3
  44. package/dist/actions/delete-product.d.cts.map +1 -1
  45. package/dist/actions/delete-product.d.mts +13 -3
  46. package/dist/actions/delete-product.d.mts.map +1 -1
  47. package/dist/actions/delete-product.mjs +2 -2
  48. package/dist/actions/delete-product.mjs.map +1 -1
  49. package/dist/actions/download-expense-file.cjs +3 -3
  50. package/dist/actions/download-expense-file.cjs.map +1 -1
  51. package/dist/actions/download-expense-file.d.cts +19 -3
  52. package/dist/actions/download-expense-file.d.cts.map +1 -1
  53. package/dist/actions/download-expense-file.d.mts +19 -3
  54. package/dist/actions/download-expense-file.d.mts.map +1 -1
  55. package/dist/actions/download-expense-file.mjs +3 -3
  56. package/dist/actions/download-expense-file.mjs.map +1 -1
  57. package/dist/actions/download-invoice-pdf.cjs +3 -3
  58. package/dist/actions/download-invoice-pdf.cjs.map +1 -1
  59. package/dist/actions/download-invoice-pdf.d.cts +19 -3
  60. package/dist/actions/download-invoice-pdf.d.cts.map +1 -1
  61. package/dist/actions/download-invoice-pdf.d.mts +19 -3
  62. package/dist/actions/download-invoice-pdf.d.mts.map +1 -1
  63. package/dist/actions/download-invoice-pdf.mjs +3 -3
  64. package/dist/actions/download-invoice-pdf.mjs.map +1 -1
  65. package/dist/actions/get-expense.cjs +7 -7
  66. package/dist/actions/get-expense.cjs.map +1 -1
  67. package/dist/actions/get-expense.d.cts +27 -3
  68. package/dist/actions/get-expense.d.cts.map +1 -1
  69. package/dist/actions/get-expense.d.mts +27 -3
  70. package/dist/actions/get-expense.d.mts.map +1 -1
  71. package/dist/actions/get-expense.mjs +7 -7
  72. package/dist/actions/get-expense.mjs.map +1 -1
  73. package/dist/actions/get-invoice.cjs +45 -45
  74. package/dist/actions/get-invoice.cjs.map +1 -1
  75. package/dist/actions/get-invoice.d.cts +109 -3
  76. package/dist/actions/get-invoice.d.cts.map +1 -1
  77. package/dist/actions/get-invoice.d.mts +109 -3
  78. package/dist/actions/get-invoice.d.mts.map +1 -1
  79. package/dist/actions/get-invoice.mjs +45 -45
  80. package/dist/actions/get-invoice.mjs.map +1 -1
  81. package/dist/actions/get-payment.cjs +9 -9
  82. package/dist/actions/get-payment.cjs.map +1 -1
  83. package/dist/actions/get-payment.d.cts +27 -3
  84. package/dist/actions/get-payment.d.cts.map +1 -1
  85. package/dist/actions/get-payment.d.mts +27 -3
  86. package/dist/actions/get-payment.d.mts.map +1 -1
  87. package/dist/actions/get-payment.mjs +9 -9
  88. package/dist/actions/get-payment.mjs.map +1 -1
  89. package/dist/actions/get-product.cjs +7 -7
  90. package/dist/actions/get-product.cjs.map +1 -1
  91. package/dist/actions/get-product.d.cts +23 -3
  92. package/dist/actions/get-product.d.cts.map +1 -1
  93. package/dist/actions/get-product.d.mts +23 -3
  94. package/dist/actions/get-product.d.mts.map +1 -1
  95. package/dist/actions/get-product.mjs +7 -7
  96. package/dist/actions/get-product.mjs.map +1 -1
  97. package/dist/actions/get-profile.cjs +7 -7
  98. package/dist/actions/get-profile.cjs.map +1 -1
  99. package/dist/actions/get-profile.d.cts +23 -3
  100. package/dist/actions/get-profile.d.cts.map +1 -1
  101. package/dist/actions/get-profile.d.mts +23 -3
  102. package/dist/actions/get-profile.d.mts.map +1 -1
  103. package/dist/actions/get-profile.mjs +7 -7
  104. package/dist/actions/get-profile.mjs.map +1 -1
  105. package/dist/actions/list-currencies.cjs +3 -3
  106. package/dist/actions/list-currencies.cjs.map +1 -1
  107. package/dist/actions/list-currencies.d.cts +15 -3
  108. package/dist/actions/list-currencies.d.cts.map +1 -1
  109. package/dist/actions/list-currencies.d.mts +15 -3
  110. package/dist/actions/list-currencies.d.mts.map +1 -1
  111. package/dist/actions/list-currencies.mjs +3 -3
  112. package/dist/actions/list-currencies.mjs.map +1 -1
  113. package/dist/actions/list-customers.cjs +13 -13
  114. package/dist/actions/list-customers.cjs.map +1 -1
  115. package/dist/actions/list-customers.d.cts +45 -3
  116. package/dist/actions/list-customers.d.cts.map +1 -1
  117. package/dist/actions/list-customers.d.mts +45 -3
  118. package/dist/actions/list-customers.d.mts.map +1 -1
  119. package/dist/actions/list-customers.mjs +13 -13
  120. package/dist/actions/list-customers.mjs.map +1 -1
  121. package/dist/actions/list-expenses.cjs +16 -16
  122. package/dist/actions/list-expenses.cjs.map +1 -1
  123. package/dist/actions/list-expenses.d.cts +47 -3
  124. package/dist/actions/list-expenses.d.cts.map +1 -1
  125. package/dist/actions/list-expenses.d.mts +47 -3
  126. package/dist/actions/list-expenses.d.mts.map +1 -1
  127. package/dist/actions/list-expenses.mjs +16 -16
  128. package/dist/actions/list-expenses.mjs.map +1 -1
  129. package/dist/actions/list-invoices.cjs +54 -54
  130. package/dist/actions/list-invoices.cjs.map +1 -1
  131. package/dist/actions/list-invoices.d.cts +133 -3
  132. package/dist/actions/list-invoices.d.cts.map +1 -1
  133. package/dist/actions/list-invoices.d.mts +133 -3
  134. package/dist/actions/list-invoices.d.mts.map +1 -1
  135. package/dist/actions/list-invoices.mjs +54 -54
  136. package/dist/actions/list-invoices.mjs.map +1 -1
  137. package/dist/actions/list-payments.cjs +13 -13
  138. package/dist/actions/list-payments.cjs.map +1 -1
  139. package/dist/actions/list-payments.d.cts +49 -3
  140. package/dist/actions/list-payments.d.cts.map +1 -1
  141. package/dist/actions/list-payments.d.mts +49 -3
  142. package/dist/actions/list-payments.d.mts.map +1 -1
  143. package/dist/actions/list-payments.mjs +13 -13
  144. package/dist/actions/list-payments.mjs.map +1 -1
  145. package/dist/actions/list-products.cjs +11 -11
  146. package/dist/actions/list-products.cjs.map +1 -1
  147. package/dist/actions/list-products.d.cts +51 -3
  148. package/dist/actions/list-products.d.cts.map +1 -1
  149. package/dist/actions/list-products.d.mts +51 -3
  150. package/dist/actions/list-products.d.mts.map +1 -1
  151. package/dist/actions/list-products.mjs +11 -11
  152. package/dist/actions/list-products.mjs.map +1 -1
  153. package/dist/actions/update-customer.cjs +13 -13
  154. package/dist/actions/update-customer.cjs.map +1 -1
  155. package/dist/actions/update-customer.d.cts +63 -3
  156. package/dist/actions/update-customer.d.cts.map +1 -1
  157. package/dist/actions/update-customer.d.mts +63 -3
  158. package/dist/actions/update-customer.d.mts.map +1 -1
  159. package/dist/actions/update-customer.mjs +13 -13
  160. package/dist/actions/update-customer.mjs.map +1 -1
  161. package/dist/actions/update-expense-file.cjs +5 -5
  162. package/dist/actions/update-expense-file.cjs.map +1 -1
  163. package/dist/actions/update-expense-file.d.cts +29 -3
  164. package/dist/actions/update-expense-file.d.cts.map +1 -1
  165. package/dist/actions/update-expense-file.d.mts +29 -3
  166. package/dist/actions/update-expense-file.d.mts.map +1 -1
  167. package/dist/actions/update-expense-file.mjs +5 -5
  168. package/dist/actions/update-expense-file.mjs.map +1 -1
  169. package/dist/actions/update-expense.cjs +7 -7
  170. package/dist/actions/update-expense.cjs.map +1 -1
  171. package/dist/actions/update-expense.d.cts +31 -3
  172. package/dist/actions/update-expense.d.cts.map +1 -1
  173. package/dist/actions/update-expense.d.mts +31 -3
  174. package/dist/actions/update-expense.d.mts.map +1 -1
  175. package/dist/actions/update-expense.mjs +7 -7
  176. package/dist/actions/update-expense.mjs.map +1 -1
  177. package/dist/actions/update-invoice.cjs +52 -52
  178. package/dist/actions/update-invoice.cjs.map +1 -1
  179. package/dist/actions/update-invoice.d.cts +203 -3
  180. package/dist/actions/update-invoice.d.cts.map +1 -1
  181. package/dist/actions/update-invoice.d.mts +203 -3
  182. package/dist/actions/update-invoice.d.mts.map +1 -1
  183. package/dist/actions/update-invoice.mjs +52 -52
  184. package/dist/actions/update-invoice.mjs.map +1 -1
  185. package/dist/actions/update-product.cjs +7 -7
  186. package/dist/actions/update-product.cjs.map +1 -1
  187. package/dist/actions/update-product.d.cts +31 -3
  188. package/dist/actions/update-product.d.cts.map +1 -1
  189. package/dist/actions/update-product.d.mts +31 -3
  190. package/dist/actions/update-product.d.mts.map +1 -1
  191. package/dist/actions/update-product.mjs +7 -7
  192. package/dist/actions/update-product.mjs.map +1 -1
  193. package/dist/catalog.cjs +7 -1
  194. package/dist/catalog.cjs.map +1 -1
  195. package/dist/catalog.d.cts +8 -0
  196. package/dist/catalog.d.mts +8 -0
  197. package/dist/catalog.mjs +7 -1
  198. package/dist/catalog.mjs.map +1 -1
  199. package/package.json +2 -2
@@ -1,9 +1,241 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/create-invoice.d.ts
4
- declare const FinmeiCreateInvoiceInput: z.ZodTypeAny;
5
- declare const FinmeiCreateInvoiceOutput: z.ZodTypeAny;
6
- declare const finmeiCreateInvoice: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const FinmeiCreateInvoiceInput: z.ZodObject<{
5
+ code: z.ZodOptional<z.ZodString>;
6
+ type: z.ZodOptional<z.ZodEnum<{
7
+ regular_invoice: "regular_invoice";
8
+ vat_invoice: "vat_invoice";
9
+ preliminary_invoice: "preliminary_invoice";
10
+ preliminary_vat_invoice: "preliminary_vat_invoice";
11
+ credit_invoice: "credit_invoice";
12
+ credit_vat_invoice: "credit_vat_invoice";
13
+ }>>;
14
+ buyer: z.ZodOptional<z.ZodObject<{
15
+ name: z.ZodOptional<z.ZodString>;
16
+ type: z.ZodEnum<{
17
+ person: "person";
18
+ company: "company";
19
+ }>;
20
+ email: z.ZodOptional<z.ZodString>;
21
+ address: z.ZodOptional<z.ZodString>;
22
+ last_name: z.ZodOptional<z.ZodString>;
23
+ first_name: z.ZodOptional<z.ZodString>;
24
+ company_name: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strip>>;
26
+ notes: z.ZodOptional<z.ZodString>;
27
+ seller: z.ZodOptional<z.ZodObject<{
28
+ email: z.ZodOptional<z.ZodString>;
29
+ address: z.ZodOptional<z.ZodString>;
30
+ company_name: z.ZodString;
31
+ }, z.core.$strip>>;
32
+ series: z.ZodOptional<z.ZodString>;
33
+ currency: z.ZodOptional<z.ZodString>;
34
+ customer: z.ZodOptional<z.ZodObject<{
35
+ name: z.ZodString;
36
+ email: z.ZodString;
37
+ address: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>>;
39
+ due_date: z.ZodOptional<z.ZodString>;
40
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
41
+ name: z.ZodString;
42
+ price: z.ZodNumber;
43
+ units: z.ZodOptional<z.ZodString>;
44
+ quantity: z.ZodNumber;
45
+ vat_percentage: z.ZodOptional<z.ZodNumber>;
46
+ }, z.core.$strip>>>;
47
+ issue_date: z.ZodOptional<z.ZodString>;
48
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
49
+ quantity: z.ZodNumber;
50
+ unit_price: z.ZodNumber;
51
+ description: z.ZodString;
52
+ }, z.core.$strip>>>;
53
+ customer_id: z.ZodOptional<z.ZodString>;
54
+ invoice_date: z.ZodOptional<z.ZodString>;
55
+ use_default_seller_info: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
56
+ }, z.core.$strip>;
57
+ declare const FinmeiCreateInvoiceOutput: z.ZodObject<{
58
+ id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
59
+ vat: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
60
+ code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
61
+ buyer: z.ZodPreprocess<z.ZodOptional<z.ZodObject<{
62
+ type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
63
+ email: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
64
+ phone: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
65
+ address: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
66
+ vat_code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
67
+ last_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
68
+ first_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
69
+ company_code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
70
+ company_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
71
+ individual_tax_id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
72
+ }, z.core.$strip>>>;
73
+ items: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
74
+ id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
75
+ name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
76
+ price: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
77
+ units: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
78
+ quantity: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
79
+ vat_percentage: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
80
+ }, z.core.$strip>>>>;
81
+ notes: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
82
+ seller: z.ZodPreprocess<z.ZodOptional<z.ZodObject<{
83
+ email: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
84
+ phone: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
85
+ address: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
86
+ vat_code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
87
+ last_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
88
+ first_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
89
+ company_code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
90
+ company_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
91
+ business_type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
92
+ custom_fields: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
93
+ individual_tax_id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
94
+ }, z.core.$strip>>>;
95
+ series: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
96
+ status: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
97
+ currency: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
98
+ customer: z.ZodPreprocess<z.ZodOptional<z.ZodObject<{
99
+ id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
100
+ name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
101
+ email: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
102
+ address: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
103
+ }, z.core.$strip>>>;
104
+ due_date: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
105
+ language: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
106
+ subtotal: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
107
+ amount_due: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
108
+ created_at: z.ZodPreprocess<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
109
+ issue_date: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
110
+ line_items: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
111
+ quantity: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
112
+ unit_price: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
113
+ description: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
114
+ }, z.core.$strip>>>>;
115
+ share_link: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
116
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
117
+ amount_paid: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
118
+ business_id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
119
+ invoice_date: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
120
+ invoice_type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
121
+ invoice_number: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
122
+ pay_until_date: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
123
+ payment_status: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
124
+ total_incl_vat: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
125
+ payment_options: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
126
+ }, z.core.$strip>;
127
+ declare const finmeiCreateInvoice: import("@keystrokehq/action").WorkflowActionDefinition<{
128
+ code?: string | undefined;
129
+ type?: "regular_invoice" | "vat_invoice" | "preliminary_invoice" | "preliminary_vat_invoice" | "credit_invoice" | "credit_vat_invoice" | undefined;
130
+ buyer?: {
131
+ type: "person" | "company";
132
+ name?: string | undefined;
133
+ email?: string | undefined;
134
+ address?: string | undefined;
135
+ last_name?: string | undefined;
136
+ first_name?: string | undefined;
137
+ company_name?: string | undefined;
138
+ } | undefined;
139
+ notes?: string | undefined;
140
+ seller?: {
141
+ company_name: string;
142
+ email?: string | undefined;
143
+ address?: string | undefined;
144
+ } | undefined;
145
+ series?: string | undefined;
146
+ currency?: string | undefined;
147
+ customer?: {
148
+ name: string;
149
+ email: string;
150
+ address?: string | undefined;
151
+ } | undefined;
152
+ due_date?: string | undefined;
153
+ products?: {
154
+ name: string;
155
+ price: number;
156
+ quantity: number;
157
+ units?: string | undefined;
158
+ vat_percentage?: number | undefined;
159
+ }[] | undefined;
160
+ issue_date?: string | undefined;
161
+ line_items?: {
162
+ quantity: number;
163
+ unit_price: number;
164
+ description: string;
165
+ }[] | undefined;
166
+ customer_id?: string | undefined;
167
+ invoice_date?: string | undefined;
168
+ use_default_seller_info?: boolean | undefined;
169
+ }, {
170
+ id?: string | undefined;
171
+ vat?: number | undefined;
172
+ code?: string | undefined;
173
+ buyer?: {
174
+ type?: string | undefined;
175
+ email?: string | undefined;
176
+ phone?: string | undefined;
177
+ address?: string | undefined;
178
+ vat_code?: string | undefined;
179
+ last_name?: string | undefined;
180
+ first_name?: string | undefined;
181
+ company_code?: string | undefined;
182
+ company_name?: string | undefined;
183
+ individual_tax_id?: string | undefined;
184
+ } | undefined;
185
+ items?: {
186
+ id?: string | undefined;
187
+ name?: string | undefined;
188
+ price?: number | undefined;
189
+ units?: string | undefined;
190
+ quantity?: number | undefined;
191
+ vat_percentage?: number | undefined;
192
+ }[] | undefined;
193
+ notes?: string | undefined;
194
+ seller?: {
195
+ email?: string | undefined;
196
+ phone?: string | undefined;
197
+ address?: string | undefined;
198
+ vat_code?: string | undefined;
199
+ last_name?: string | undefined;
200
+ first_name?: string | undefined;
201
+ company_code?: string | undefined;
202
+ company_name?: string | undefined;
203
+ business_type?: string | undefined;
204
+ custom_fields?: Record<string, unknown>[] | undefined;
205
+ individual_tax_id?: string | undefined;
206
+ } | undefined;
207
+ series?: string | undefined;
208
+ status?: string | undefined;
209
+ currency?: string | undefined;
210
+ customer?: {
211
+ id?: string | undefined;
212
+ name?: string | undefined;
213
+ email?: string | undefined;
214
+ address?: string | undefined;
215
+ } | undefined;
216
+ due_date?: string | undefined;
217
+ language?: string | undefined;
218
+ subtotal?: number | undefined;
219
+ amount_due?: number | undefined;
220
+ created_at?: string | number | undefined;
221
+ issue_date?: string | undefined;
222
+ line_items?: {
223
+ quantity?: number | undefined;
224
+ unit_price?: number | undefined;
225
+ description?: string | undefined;
226
+ }[] | undefined;
227
+ share_link?: string | undefined;
228
+ updated_at?: string | number | undefined;
229
+ amount_paid?: number | undefined;
230
+ business_id?: string | undefined;
231
+ invoice_date?: string | undefined;
232
+ invoice_type?: string | undefined;
233
+ invoice_number?: string | undefined;
234
+ pay_until_date?: string | undefined;
235
+ payment_status?: string | undefined;
236
+ total_incl_vat?: number | undefined;
237
+ payment_options?: Record<string, unknown>[] | undefined;
238
+ }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
239
  //#endregion
8
240
  export { finmeiCreateInvoice };
9
241
  //# sourceMappingURL=create-invoice.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-invoice.d.cts","names":[],"sources":["../../src/actions/create-invoice.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UA0CvC;AAAA,cA6CW,yBAAA,EAA2B,CAAA,CAAE,UA8BxC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"create-invoice.d.cts","names":[],"sources":["../../src/actions/create-invoice.ts"],"mappings":";;;cAIa,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuFxB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgCzB,mBAAA,gCAAmB,wBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAM9B,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAA,MAAA;AAAA"}
@@ -1,9 +1,241 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/create-invoice.d.ts
4
- declare const FinmeiCreateInvoiceInput: z.ZodTypeAny;
5
- declare const FinmeiCreateInvoiceOutput: z.ZodTypeAny;
6
- declare const finmeiCreateInvoice: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const FinmeiCreateInvoiceInput: z.ZodObject<{
5
+ code: z.ZodOptional<z.ZodString>;
6
+ type: z.ZodOptional<z.ZodEnum<{
7
+ regular_invoice: "regular_invoice";
8
+ vat_invoice: "vat_invoice";
9
+ preliminary_invoice: "preliminary_invoice";
10
+ preliminary_vat_invoice: "preliminary_vat_invoice";
11
+ credit_invoice: "credit_invoice";
12
+ credit_vat_invoice: "credit_vat_invoice";
13
+ }>>;
14
+ buyer: z.ZodOptional<z.ZodObject<{
15
+ name: z.ZodOptional<z.ZodString>;
16
+ type: z.ZodEnum<{
17
+ person: "person";
18
+ company: "company";
19
+ }>;
20
+ email: z.ZodOptional<z.ZodString>;
21
+ address: z.ZodOptional<z.ZodString>;
22
+ last_name: z.ZodOptional<z.ZodString>;
23
+ first_name: z.ZodOptional<z.ZodString>;
24
+ company_name: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strip>>;
26
+ notes: z.ZodOptional<z.ZodString>;
27
+ seller: z.ZodOptional<z.ZodObject<{
28
+ email: z.ZodOptional<z.ZodString>;
29
+ address: z.ZodOptional<z.ZodString>;
30
+ company_name: z.ZodString;
31
+ }, z.core.$strip>>;
32
+ series: z.ZodOptional<z.ZodString>;
33
+ currency: z.ZodOptional<z.ZodString>;
34
+ customer: z.ZodOptional<z.ZodObject<{
35
+ name: z.ZodString;
36
+ email: z.ZodString;
37
+ address: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>>;
39
+ due_date: z.ZodOptional<z.ZodString>;
40
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
41
+ name: z.ZodString;
42
+ price: z.ZodNumber;
43
+ units: z.ZodOptional<z.ZodString>;
44
+ quantity: z.ZodNumber;
45
+ vat_percentage: z.ZodOptional<z.ZodNumber>;
46
+ }, z.core.$strip>>>;
47
+ issue_date: z.ZodOptional<z.ZodString>;
48
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
49
+ quantity: z.ZodNumber;
50
+ unit_price: z.ZodNumber;
51
+ description: z.ZodString;
52
+ }, z.core.$strip>>>;
53
+ customer_id: z.ZodOptional<z.ZodString>;
54
+ invoice_date: z.ZodOptional<z.ZodString>;
55
+ use_default_seller_info: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
56
+ }, z.core.$strip>;
57
+ declare const FinmeiCreateInvoiceOutput: z.ZodObject<{
58
+ id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
59
+ vat: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
60
+ code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
61
+ buyer: z.ZodPreprocess<z.ZodOptional<z.ZodObject<{
62
+ type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
63
+ email: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
64
+ phone: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
65
+ address: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
66
+ vat_code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
67
+ last_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
68
+ first_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
69
+ company_code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
70
+ company_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
71
+ individual_tax_id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
72
+ }, z.core.$strip>>>;
73
+ items: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
74
+ id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
75
+ name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
76
+ price: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
77
+ units: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
78
+ quantity: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
79
+ vat_percentage: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
80
+ }, z.core.$strip>>>>;
81
+ notes: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
82
+ seller: z.ZodPreprocess<z.ZodOptional<z.ZodObject<{
83
+ email: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
84
+ phone: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
85
+ address: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
86
+ vat_code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
87
+ last_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
88
+ first_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
89
+ company_code: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
90
+ company_name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
91
+ business_type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
92
+ custom_fields: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
93
+ individual_tax_id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
94
+ }, z.core.$strip>>>;
95
+ series: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
96
+ status: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
97
+ currency: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
98
+ customer: z.ZodPreprocess<z.ZodOptional<z.ZodObject<{
99
+ id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
100
+ name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
101
+ email: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
102
+ address: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
103
+ }, z.core.$strip>>>;
104
+ due_date: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
105
+ language: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
106
+ subtotal: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
107
+ amount_due: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
108
+ created_at: z.ZodPreprocess<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
109
+ issue_date: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
110
+ line_items: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
111
+ quantity: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
112
+ unit_price: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
113
+ description: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
114
+ }, z.core.$strip>>>>;
115
+ share_link: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
116
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
117
+ amount_paid: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
118
+ business_id: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
119
+ invoice_date: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
120
+ invoice_type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
121
+ invoice_number: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
122
+ pay_until_date: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
123
+ payment_status: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
124
+ total_incl_vat: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
125
+ payment_options: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
126
+ }, z.core.$strip>;
127
+ declare const finmeiCreateInvoice: import("@keystrokehq/action").WorkflowActionDefinition<{
128
+ code?: string | undefined;
129
+ type?: "regular_invoice" | "vat_invoice" | "preliminary_invoice" | "preliminary_vat_invoice" | "credit_invoice" | "credit_vat_invoice" | undefined;
130
+ buyer?: {
131
+ type: "person" | "company";
132
+ name?: string | undefined;
133
+ email?: string | undefined;
134
+ address?: string | undefined;
135
+ last_name?: string | undefined;
136
+ first_name?: string | undefined;
137
+ company_name?: string | undefined;
138
+ } | undefined;
139
+ notes?: string | undefined;
140
+ seller?: {
141
+ company_name: string;
142
+ email?: string | undefined;
143
+ address?: string | undefined;
144
+ } | undefined;
145
+ series?: string | undefined;
146
+ currency?: string | undefined;
147
+ customer?: {
148
+ name: string;
149
+ email: string;
150
+ address?: string | undefined;
151
+ } | undefined;
152
+ due_date?: string | undefined;
153
+ products?: {
154
+ name: string;
155
+ price: number;
156
+ quantity: number;
157
+ units?: string | undefined;
158
+ vat_percentage?: number | undefined;
159
+ }[] | undefined;
160
+ issue_date?: string | undefined;
161
+ line_items?: {
162
+ quantity: number;
163
+ unit_price: number;
164
+ description: string;
165
+ }[] | undefined;
166
+ customer_id?: string | undefined;
167
+ invoice_date?: string | undefined;
168
+ use_default_seller_info?: boolean | undefined;
169
+ }, {
170
+ id?: string | undefined;
171
+ vat?: number | undefined;
172
+ code?: string | undefined;
173
+ buyer?: {
174
+ type?: string | undefined;
175
+ email?: string | undefined;
176
+ phone?: string | undefined;
177
+ address?: string | undefined;
178
+ vat_code?: string | undefined;
179
+ last_name?: string | undefined;
180
+ first_name?: string | undefined;
181
+ company_code?: string | undefined;
182
+ company_name?: string | undefined;
183
+ individual_tax_id?: string | undefined;
184
+ } | undefined;
185
+ items?: {
186
+ id?: string | undefined;
187
+ name?: string | undefined;
188
+ price?: number | undefined;
189
+ units?: string | undefined;
190
+ quantity?: number | undefined;
191
+ vat_percentage?: number | undefined;
192
+ }[] | undefined;
193
+ notes?: string | undefined;
194
+ seller?: {
195
+ email?: string | undefined;
196
+ phone?: string | undefined;
197
+ address?: string | undefined;
198
+ vat_code?: string | undefined;
199
+ last_name?: string | undefined;
200
+ first_name?: string | undefined;
201
+ company_code?: string | undefined;
202
+ company_name?: string | undefined;
203
+ business_type?: string | undefined;
204
+ custom_fields?: Record<string, unknown>[] | undefined;
205
+ individual_tax_id?: string | undefined;
206
+ } | undefined;
207
+ series?: string | undefined;
208
+ status?: string | undefined;
209
+ currency?: string | undefined;
210
+ customer?: {
211
+ id?: string | undefined;
212
+ name?: string | undefined;
213
+ email?: string | undefined;
214
+ address?: string | undefined;
215
+ } | undefined;
216
+ due_date?: string | undefined;
217
+ language?: string | undefined;
218
+ subtotal?: number | undefined;
219
+ amount_due?: number | undefined;
220
+ created_at?: string | number | undefined;
221
+ issue_date?: string | undefined;
222
+ line_items?: {
223
+ quantity?: number | undefined;
224
+ unit_price?: number | undefined;
225
+ description?: string | undefined;
226
+ }[] | undefined;
227
+ share_link?: string | undefined;
228
+ updated_at?: string | number | undefined;
229
+ amount_paid?: number | undefined;
230
+ business_id?: string | undefined;
231
+ invoice_date?: string | undefined;
232
+ invoice_type?: string | undefined;
233
+ invoice_number?: string | undefined;
234
+ pay_until_date?: string | undefined;
235
+ payment_status?: string | undefined;
236
+ total_incl_vat?: number | undefined;
237
+ payment_options?: Record<string, unknown>[] | undefined;
238
+ }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
239
  //#endregion
8
240
  export { finmeiCreateInvoice };
9
241
  //# sourceMappingURL=create-invoice.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-invoice.d.mts","names":[],"sources":["../../src/actions/create-invoice.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UA0CvC;AAAA,cA6CW,yBAAA,EAA2B,CAAA,CAAE,UA8BxC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"create-invoice.d.mts","names":[],"sources":["../../src/actions/create-invoice.ts"],"mappings":";;;cAIa,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuFxB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgCzB,mBAAA,gCAAmB,wBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAM9B,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAA,MAAA;AAAA"}
@@ -52,48 +52,48 @@ const FinmeiCreateInvoiceInput = z.object({
52
52
  use_default_seller_info: z.boolean().default(true).describe("If true, API will use default seller info instead of requiring seller object").optional()
53
53
  });
54
54
  const FinmeiCreateInvoice_BuyerResponseSchema = z.object({
55
- type: z.string().describe("Buyer type (individual, company)").nullable().optional(),
56
- email: z.string().describe("Contact email").nullable().optional(),
57
- phone: z.string().describe("Contact phone").nullable().optional(),
58
- address: z.string().describe("Buyer address").nullable().optional(),
59
- vat_code: z.string().describe("VAT code").nullable().optional(),
60
- last_name: z.string().describe("Last name (for individuals)").nullable().optional(),
61
- first_name: z.string().describe("First name (for individuals)").nullable().optional(),
62
- company_code: z.string().describe("Company registration code").nullable().optional(),
63
- company_name: z.string().describe("Company name (for companies)").nullable().optional(),
64
- individual_tax_id: z.string().describe("Individual tax ID").nullable().optional()
55
+ type: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Buyer type (individual, company)").optional()),
56
+ email: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Contact email").optional()),
57
+ phone: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Contact phone").optional()),
58
+ address: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Buyer address").optional()),
59
+ vat_code: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("VAT code").optional()),
60
+ last_name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Last name (for individuals)").optional()),
61
+ first_name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("First name (for individuals)").optional()),
62
+ company_code: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Company registration code").optional()),
63
+ company_name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Company name (for companies)").optional()),
64
+ individual_tax_id: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Individual tax ID").optional())
65
65
  });
66
66
  const FinmeiCreateInvoice_InvoiceItemResponseSchema = z.object({
67
- id: z.string().describe("Item unique identifier").nullable().optional(),
68
- name: z.string().describe("Product or service name").nullable().optional(),
69
- price: z.number().describe("Unit price").nullable().optional(),
70
- units: z.string().describe("Units (e.g., pcs, hours)").nullable().optional(),
71
- quantity: z.number().describe("Quantity").nullable().optional(),
72
- vat_percentage: z.number().describe("VAT percentage applied").nullable().optional()
67
+ id: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Item unique identifier").optional()),
68
+ name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Product or service name").optional()),
69
+ price: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Unit price").optional()),
70
+ units: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Units (e.g., pcs, hours)").optional()),
71
+ quantity: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Quantity").optional()),
72
+ vat_percentage: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("VAT percentage applied").optional())
73
73
  });
74
74
  const FinmeiCreateInvoice_SellerResponseSchema = z.object({
75
- email: z.string().describe("Contact email").nullable().optional(),
76
- phone: z.string().describe("Contact phone").nullable().optional(),
77
- address: z.string().describe("Business address").nullable().optional(),
78
- vat_code: z.string().describe("VAT code").nullable().optional(),
79
- last_name: z.string().describe("Last name (for individuals)").nullable().optional(),
80
- first_name: z.string().describe("First name (for individuals)").nullable().optional(),
81
- company_code: z.string().describe("Company registration code").nullable().optional(),
82
- company_name: z.string().describe("Company name (for companies)").nullable().optional(),
83
- business_type: z.string().describe("Type of business (company, individual)").nullable().optional(),
84
- custom_fields: z.array(z.record(z.string(), z.unknown())).describe("Custom fields").nullable().optional(),
85
- individual_tax_id: z.string().describe("Individual tax ID").nullable().optional()
75
+ email: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Contact email").optional()),
76
+ phone: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Contact phone").optional()),
77
+ address: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Business address").optional()),
78
+ vat_code: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("VAT code").optional()),
79
+ last_name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Last name (for individuals)").optional()),
80
+ first_name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("First name (for individuals)").optional()),
81
+ company_code: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Company registration code").optional()),
82
+ company_name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Company name (for companies)").optional()),
83
+ business_type: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Type of business (company, individual)").optional()),
84
+ custom_fields: z.preprocess((value) => value === null ? void 0 : value, z.array(z.record(z.string(), z.unknown())).describe("Custom fields").optional()),
85
+ individual_tax_id: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Individual tax ID").optional())
86
86
  });
87
87
  const FinmeiCreateInvoice_CustomerResponseSchema = z.object({
88
- id: z.string().describe("Unique identifier of the customer").nullable().optional(),
89
- name: z.string().describe("Full name of the customer").nullable().optional(),
90
- email: z.string().describe("Email address of the customer").nullable().optional(),
91
- address: z.string().describe("Postal address of the customer").nullable().optional()
88
+ id: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Unique identifier of the customer").optional()),
89
+ name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Full name of the customer").optional()),
90
+ email: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Email address of the customer").optional()),
91
+ address: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Postal address of the customer").optional())
92
92
  });
93
93
  const FinmeiCreateInvoice_LineItemResponseSchema = z.object({
94
- quantity: z.number().describe("Quantity of the item").nullable().optional(),
95
- unit_price: z.number().describe("Unit price of the item").nullable().optional(),
96
- description: z.string().describe("Description of the line item").nullable().optional()
94
+ quantity: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Quantity of the item").optional()),
95
+ unit_price: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Unit price of the item").optional()),
96
+ description: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Description of the line item").optional())
97
97
  });
98
98
  const finmeiCreateInvoice = action("FINMEI_CREATE_INVOICE", {
99
99
  slug: "finmei-create-invoice",
@@ -101,35 +101,35 @@ const finmeiCreateInvoice = action("FINMEI_CREATE_INVOICE", {
101
101
  description: "Creates a new invoice in Finmei with buyer information and line items. Use this when you need to generate an invoice for a customer. You can specify: - Buyer details (person or company) - Products/services with quantities and prices - Invoice type (regular, VAT, preliminary, credit) - Currency, dates, and custom notes Example: \"Create an invoice for Tech Solutions Inc with 3 months of support services at $99.99/month\"",
102
102
  input: FinmeiCreateInvoiceInput,
103
103
  output: z.object({
104
- id: z.string().describe("Unique identifier of the created invoice").nullable().optional(),
105
- vat: z.number().describe("Total VAT amount").nullable().optional(),
106
- code: z.string().describe("Invoice code or reference (legacy)").nullable().optional(),
107
- buyer: FinmeiCreateInvoice_BuyerResponseSchema.nullable().optional(),
108
- items: z.array(FinmeiCreateInvoice_InvoiceItemResponseSchema).describe("Line items on the invoice").nullable().optional(),
109
- notes: z.string().describe("Notes included on the invoice").nullable().optional(),
110
- seller: FinmeiCreateInvoice_SellerResponseSchema.nullable().optional(),
111
- series: z.string().describe("Invoice series/prefix").nullable().optional(),
112
- status: z.string().describe("Status of the invoice (legacy)").nullable().optional(),
113
- currency: z.string().describe("Currency code of the invoice").nullable().optional(),
114
- customer: FinmeiCreateInvoice_CustomerResponseSchema.nullable().optional(),
115
- due_date: z.string().describe("Payment due date (legacy)").nullable().optional(),
116
- language: z.string().describe("Invoice language").nullable().optional(),
117
- subtotal: z.number().describe("Subtotal amount before VAT").nullable().optional(),
118
- amount_due: z.number().describe("Total amount due on the invoice (legacy)").nullable().optional(),
119
- created_at: z.union([z.string(), z.number().int()]).nullable().optional(),
120
- issue_date: z.string().describe("Date the invoice was issued (legacy)").nullable().optional(),
121
- line_items: z.array(FinmeiCreateInvoice_LineItemResponseSchema).describe("Line items (legacy)").nullable().optional(),
122
- share_link: z.string().describe("Public link to share the invoice").nullable().optional(),
123
- updated_at: z.union([z.string(), z.number().int()]).nullable().optional(),
124
- amount_paid: z.number().describe("Total amount paid on the invoice (legacy)").nullable().optional(),
125
- business_id: z.string().describe("Business identifier").nullable().optional(),
126
- invoice_date: z.string().describe("Date the invoice was issued").nullable().optional(),
127
- invoice_type: z.string().describe("Type of the invoice").nullable().optional(),
128
- invoice_number: z.string().describe("Invoice number").nullable().optional(),
129
- pay_until_date: z.string().describe("Payment due date").nullable().optional(),
130
- payment_status: z.string().describe("Payment status of the invoice").nullable().optional(),
131
- total_incl_vat: z.number().describe("Total amount including VAT").nullable().optional(),
132
- payment_options: z.array(z.record(z.string(), z.unknown())).describe("Available payment options").nullable().optional()
104
+ id: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Unique identifier of the created invoice").optional()),
105
+ vat: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Total VAT amount").optional()),
106
+ code: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Invoice code or reference (legacy)").optional()),
107
+ buyer: z.preprocess((value) => value === null ? void 0 : value, FinmeiCreateInvoice_BuyerResponseSchema.optional()),
108
+ items: z.preprocess((value) => value === null ? void 0 : value, z.array(FinmeiCreateInvoice_InvoiceItemResponseSchema).describe("Line items on the invoice").optional()),
109
+ notes: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Notes included on the invoice").optional()),
110
+ seller: z.preprocess((value) => value === null ? void 0 : value, FinmeiCreateInvoice_SellerResponseSchema.optional()),
111
+ series: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Invoice series/prefix").optional()),
112
+ status: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Status of the invoice (legacy)").optional()),
113
+ currency: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Currency code of the invoice").optional()),
114
+ customer: z.preprocess((value) => value === null ? void 0 : value, FinmeiCreateInvoice_CustomerResponseSchema.optional()),
115
+ due_date: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Payment due date (legacy)").optional()),
116
+ language: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Invoice language").optional()),
117
+ subtotal: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Subtotal amount before VAT").optional()),
118
+ amount_due: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Total amount due on the invoice (legacy)").optional()),
119
+ created_at: z.preprocess((value) => value === null ? void 0 : value, z.union([z.string(), z.number().int()]).optional()),
120
+ issue_date: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Date the invoice was issued (legacy)").optional()),
121
+ line_items: z.preprocess((value) => value === null ? void 0 : value, z.array(FinmeiCreateInvoice_LineItemResponseSchema).describe("Line items (legacy)").optional()),
122
+ share_link: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Public link to share the invoice").optional()),
123
+ updated_at: z.preprocess((value) => value === null ? void 0 : value, z.union([z.string(), z.number().int()]).optional()),
124
+ amount_paid: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Total amount paid on the invoice (legacy)").optional()),
125
+ business_id: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Business identifier").optional()),
126
+ invoice_date: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Date the invoice was issued").optional()),
127
+ invoice_type: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Type of the invoice").optional()),
128
+ invoice_number: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Invoice number").optional()),
129
+ pay_until_date: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Payment due date").optional()),
130
+ payment_status: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Payment status of the invoice").optional()),
131
+ total_incl_vat: z.preprocess((value) => value === null ? void 0 : value, z.number().describe("Total amount including VAT").optional()),
132
+ payment_options: z.preprocess((value) => value === null ? void 0 : value, z.array(z.record(z.string(), z.unknown())).describe("Available payment options").optional())
133
133
  })
134
134
  });
135
135
  //#endregion