@keystrokehq/erpnext 0.1.1 → 0.1.2

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 (247) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/add-comment.cjs +5 -5
  4. package/dist/actions/add-comment.cjs.map +1 -1
  5. package/dist/actions/add-comment.d.cts +6 -18
  6. package/dist/actions/add-comment.d.mts +6 -18
  7. package/dist/actions/add-comment.mjs +5 -5
  8. package/dist/actions/add-comment.mjs.map +1 -1
  9. package/dist/actions/add-tag.cjs +1 -1
  10. package/dist/actions/add-tag.cjs.map +1 -1
  11. package/dist/actions/add-tag.d.cts +2 -4
  12. package/dist/actions/add-tag.d.mts +2 -4
  13. package/dist/actions/add-tag.mjs +1 -1
  14. package/dist/actions/add-tag.mjs.map +1 -1
  15. package/dist/actions/apply-workflow.cjs +4 -4
  16. package/dist/actions/apply-workflow.cjs.map +1 -1
  17. package/dist/actions/apply-workflow.d.cts +4 -8
  18. package/dist/actions/apply-workflow.d.cts.map +1 -1
  19. package/dist/actions/apply-workflow.d.mts +4 -8
  20. package/dist/actions/apply-workflow.d.mts.map +1 -1
  21. package/dist/actions/apply-workflow.mjs +4 -4
  22. package/dist/actions/apply-workflow.mjs.map +1 -1
  23. package/dist/actions/cancel-document.cjs +2 -2
  24. package/dist/actions/cancel-document.cjs.map +1 -1
  25. package/dist/actions/cancel-document.d.cts +3 -6
  26. package/dist/actions/cancel-document.d.cts.map +1 -1
  27. package/dist/actions/cancel-document.d.mts +3 -6
  28. package/dist/actions/cancel-document.d.mts.map +1 -1
  29. package/dist/actions/cancel-document.mjs +2 -2
  30. package/dist/actions/cancel-document.mjs.map +1 -1
  31. package/dist/actions/create-document.cjs +7 -7
  32. package/dist/actions/create-document.cjs.map +1 -1
  33. package/dist/actions/create-document.d.cts +8 -19
  34. package/dist/actions/create-document.d.mts +8 -19
  35. package/dist/actions/create-document.mjs +7 -7
  36. package/dist/actions/create-document.mjs.map +1 -1
  37. package/dist/actions/create-timesheet.d.cts +1 -11
  38. package/dist/actions/create-timesheet.d.mts +1 -11
  39. package/dist/actions/delete-document.d.cts +1 -3
  40. package/dist/actions/delete-document.d.mts +1 -3
  41. package/dist/actions/download-file.d.cts +1 -7
  42. package/dist/actions/download-file.d.mts +1 -7
  43. package/dist/actions/download-pdf.d.cts +1 -7
  44. package/dist/actions/download-pdf.d.mts +1 -7
  45. package/dist/actions/get-all-languages.cjs +2 -2
  46. package/dist/actions/get-all-languages.cjs.map +1 -1
  47. package/dist/actions/get-all-languages.d.cts +3 -8
  48. package/dist/actions/get-all-languages.d.mts +3 -8
  49. package/dist/actions/get-all-languages.mjs +2 -2
  50. package/dist/actions/get-all-languages.mjs.map +1 -1
  51. package/dist/actions/get-all-roles.d.cts +1 -3
  52. package/dist/actions/get-all-roles.d.cts.map +1 -1
  53. package/dist/actions/get-all-roles.d.mts +1 -3
  54. package/dist/actions/get-all-roles.d.mts.map +1 -1
  55. package/dist/actions/get-client.cjs +7 -7
  56. package/dist/actions/get-client.cjs.map +1 -1
  57. package/dist/actions/get-client.d.cts +8 -20
  58. package/dist/actions/get-client.d.mts +8 -20
  59. package/dist/actions/get-client.mjs +7 -7
  60. package/dist/actions/get-client.mjs.map +1 -1
  61. package/dist/actions/get-count.d.cts +1 -3
  62. package/dist/actions/get-count.d.mts +1 -3
  63. package/dist/actions/get-doc-with-meta.cjs +20 -20
  64. package/dist/actions/get-doc-with-meta.cjs.map +1 -1
  65. package/dist/actions/get-doc-with-meta.d.cts +21 -43
  66. package/dist/actions/get-doc-with-meta.d.mts +21 -43
  67. package/dist/actions/get-doc-with-meta.mjs +20 -20
  68. package/dist/actions/get-doc-with-meta.mjs.map +1 -1
  69. package/dist/actions/get-doctype-meta.cjs +3 -3
  70. package/dist/actions/get-doctype-meta.cjs.map +1 -1
  71. package/dist/actions/get-doctype-meta.d.cts +4 -8
  72. package/dist/actions/get-doctype-meta.d.cts.map +1 -1
  73. package/dist/actions/get-doctype-meta.d.mts +4 -8
  74. package/dist/actions/get-doctype-meta.d.mts.map +1 -1
  75. package/dist/actions/get-doctype-meta.mjs +3 -3
  76. package/dist/actions/get-doctype-meta.mjs.map +1 -1
  77. package/dist/actions/get-document.cjs +7 -7
  78. package/dist/actions/get-document.cjs.map +1 -1
  79. package/dist/actions/get-document.d.cts +8 -19
  80. package/dist/actions/get-document.d.mts +8 -19
  81. package/dist/actions/get-document.mjs +7 -7
  82. package/dist/actions/get-document.mjs.map +1 -1
  83. package/dist/actions/get-exchange-rate.d.cts +1 -3
  84. package/dist/actions/get-exchange-rate.d.mts +1 -3
  85. package/dist/actions/get-fiscal-year.d.cts +1 -7
  86. package/dist/actions/get-fiscal-year.d.mts +1 -7
  87. package/dist/actions/get-framework-version.d.cts +1 -3
  88. package/dist/actions/get-framework-version.d.cts.map +1 -1
  89. package/dist/actions/get-framework-version.d.mts +1 -3
  90. package/dist/actions/get-framework-version.d.mts.map +1 -1
  91. package/dist/actions/get-item-details.cjs +27 -27
  92. package/dist/actions/get-item-details.cjs.map +1 -1
  93. package/dist/actions/get-item-details.d.cts +28 -59
  94. package/dist/actions/get-item-details.d.mts +28 -59
  95. package/dist/actions/get-item-details.mjs +27 -27
  96. package/dist/actions/get-item-details.mjs.map +1 -1
  97. package/dist/actions/get-list.d.cts +1 -3
  98. package/dist/actions/get-list.d.cts.map +1 -1
  99. package/dist/actions/get-list.d.mts +1 -3
  100. package/dist/actions/get-list.d.mts.map +1 -1
  101. package/dist/actions/get-logged-user.d.cts +1 -3
  102. package/dist/actions/get-logged-user.d.cts.map +1 -1
  103. package/dist/actions/get-logged-user.d.mts +1 -3
  104. package/dist/actions/get-logged-user.d.mts.map +1 -1
  105. package/dist/actions/get-party-details.cjs +36 -36
  106. package/dist/actions/get-party-details.cjs.map +1 -1
  107. package/dist/actions/get-party-details.d.cts +37 -77
  108. package/dist/actions/get-party-details.d.mts +37 -77
  109. package/dist/actions/get-party-details.mjs +36 -36
  110. package/dist/actions/get-party-details.mjs.map +1 -1
  111. package/dist/actions/get-payment-entry.cjs +26 -26
  112. package/dist/actions/get-payment-entry.cjs.map +1 -1
  113. package/dist/actions/get-payment-entry.d.cts +27 -59
  114. package/dist/actions/get-payment-entry.d.mts +27 -59
  115. package/dist/actions/get-payment-entry.mjs +26 -26
  116. package/dist/actions/get-payment-entry.mjs.map +1 -1
  117. package/dist/actions/get-stock-balance.d.cts +1 -3
  118. package/dist/actions/get-stock-balance.d.mts +1 -3
  119. package/dist/actions/get-timezones.d.cts +1 -5
  120. package/dist/actions/get-timezones.d.cts.map +1 -1
  121. package/dist/actions/get-timezones.d.mts +1 -5
  122. package/dist/actions/get-timezones.d.mts.map +1 -1
  123. package/dist/actions/get-user-roles.d.cts +1 -3
  124. package/dist/actions/get-user-roles.d.mts +1 -3
  125. package/dist/actions/get-value.d.cts +1 -3
  126. package/dist/actions/get-value.d.cts.map +1 -1
  127. package/dist/actions/get-value.d.mts +1 -3
  128. package/dist/actions/get-value.d.mts.map +1 -1
  129. package/dist/actions/get-workflow-transitions.cjs +7 -7
  130. package/dist/actions/get-workflow-transitions.cjs.map +1 -1
  131. package/dist/actions/get-workflow-transitions.d.cts +8 -17
  132. package/dist/actions/get-workflow-transitions.d.mts +8 -17
  133. package/dist/actions/get-workflow-transitions.mjs +7 -7
  134. package/dist/actions/get-workflow-transitions.mjs.map +1 -1
  135. package/dist/actions/insert-document.d.cts +1 -3
  136. package/dist/actions/insert-document.d.cts.map +1 -1
  137. package/dist/actions/insert-document.d.mts +1 -3
  138. package/dist/actions/insert-document.d.mts.map +1 -1
  139. package/dist/actions/insert-many.cjs +4 -4
  140. package/dist/actions/insert-many.cjs.map +1 -1
  141. package/dist/actions/insert-many.d.cts +4 -10
  142. package/dist/actions/insert-many.d.mts +4 -10
  143. package/dist/actions/insert-many.mjs +4 -4
  144. package/dist/actions/insert-many.mjs.map +1 -1
  145. package/dist/actions/list-doctypes.cjs +1 -1
  146. package/dist/actions/list-doctypes.cjs.map +1 -1
  147. package/dist/actions/list-doctypes.d.cts +2 -4
  148. package/dist/actions/list-doctypes.d.cts.map +1 -1
  149. package/dist/actions/list-doctypes.d.mts +2 -4
  150. package/dist/actions/list-doctypes.d.mts.map +1 -1
  151. package/dist/actions/list-doctypes.mjs +1 -1
  152. package/dist/actions/list-doctypes.mjs.map +1 -1
  153. package/dist/actions/list-documents.d.cts +1 -3
  154. package/dist/actions/list-documents.d.cts.map +1 -1
  155. package/dist/actions/list-documents.d.mts +1 -3
  156. package/dist/actions/list-documents.d.mts.map +1 -1
  157. package/dist/actions/list-employees.d.cts +1 -6
  158. package/dist/actions/list-employees.d.mts +1 -6
  159. package/dist/actions/list-projects.d.cts +1 -3
  160. package/dist/actions/list-projects.d.cts.map +1 -1
  161. package/dist/actions/list-projects.d.mts +1 -3
  162. package/dist/actions/list-projects.d.mts.map +1 -1
  163. package/dist/actions/list-timesheets.d.cts +1 -3
  164. package/dist/actions/list-timesheets.d.cts.map +1 -1
  165. package/dist/actions/list-timesheets.d.mts +1 -3
  166. package/dist/actions/list-timesheets.d.mts.map +1 -1
  167. package/dist/actions/list-webhooks.cjs +4 -4
  168. package/dist/actions/list-webhooks.cjs.map +1 -1
  169. package/dist/actions/list-webhooks.d.cts +5 -14
  170. package/dist/actions/list-webhooks.d.mts +5 -14
  171. package/dist/actions/list-webhooks.mjs +4 -4
  172. package/dist/actions/list-webhooks.mjs.map +1 -1
  173. package/dist/actions/make-delivery-note.cjs +11 -11
  174. package/dist/actions/make-delivery-note.cjs.map +1 -1
  175. package/dist/actions/make-delivery-note.d.cts +12 -27
  176. package/dist/actions/make-delivery-note.d.cts.map +1 -1
  177. package/dist/actions/make-delivery-note.d.mts +12 -27
  178. package/dist/actions/make-delivery-note.d.mts.map +1 -1
  179. package/dist/actions/make-delivery-note.mjs +11 -11
  180. package/dist/actions/make-delivery-note.mjs.map +1 -1
  181. package/dist/actions/make-purchase-order.cjs +22 -22
  182. package/dist/actions/make-purchase-order.cjs.map +1 -1
  183. package/dist/actions/make-purchase-order.d.cts +23 -51
  184. package/dist/actions/make-purchase-order.d.mts +23 -51
  185. package/dist/actions/make-purchase-order.mjs +22 -22
  186. package/dist/actions/make-purchase-order.mjs.map +1 -1
  187. package/dist/actions/make-sales-invoice.cjs +13 -13
  188. package/dist/actions/make-sales-invoice.cjs.map +1 -1
  189. package/dist/actions/make-sales-invoice.d.cts +14 -31
  190. package/dist/actions/make-sales-invoice.d.cts.map +1 -1
  191. package/dist/actions/make-sales-invoice.d.mts +14 -31
  192. package/dist/actions/make-sales-invoice.d.mts.map +1 -1
  193. package/dist/actions/make-sales-invoice.mjs +13 -13
  194. package/dist/actions/make-sales-invoice.mjs.map +1 -1
  195. package/dist/actions/make-stock-entry.cjs +9 -9
  196. package/dist/actions/make-stock-entry.cjs.map +1 -1
  197. package/dist/actions/make-stock-entry.d.cts +10 -22
  198. package/dist/actions/make-stock-entry.d.mts +10 -22
  199. package/dist/actions/make-stock-entry.mjs +9 -9
  200. package/dist/actions/make-stock-entry.mjs.map +1 -1
  201. package/dist/actions/ping.d.cts +1 -3
  202. package/dist/actions/ping.d.cts.map +1 -1
  203. package/dist/actions/ping.d.mts +1 -3
  204. package/dist/actions/ping.d.mts.map +1 -1
  205. package/dist/actions/rename-doc.d.cts +1 -3
  206. package/dist/actions/rename-doc.d.mts +1 -3
  207. package/dist/actions/save-docs.cjs +5 -5
  208. package/dist/actions/save-docs.cjs.map +1 -1
  209. package/dist/actions/save-docs.d.cts +6 -12
  210. package/dist/actions/save-docs.d.cts.map +1 -1
  211. package/dist/actions/save-docs.d.mts +6 -12
  212. package/dist/actions/save-docs.d.mts.map +1 -1
  213. package/dist/actions/save-docs.mjs +5 -5
  214. package/dist/actions/save-docs.mjs.map +1 -1
  215. package/dist/actions/save-document.cjs +2 -2
  216. package/dist/actions/save-document.cjs.map +1 -1
  217. package/dist/actions/save-document.d.cts +3 -9
  218. package/dist/actions/save-document.d.mts +3 -9
  219. package/dist/actions/save-document.mjs +2 -2
  220. package/dist/actions/save-document.mjs.map +1 -1
  221. package/dist/actions/search-global.cjs +7 -7
  222. package/dist/actions/search-global.cjs.map +1 -1
  223. package/dist/actions/search-global.d.cts +8 -17
  224. package/dist/actions/search-global.d.mts +8 -17
  225. package/dist/actions/search-global.mjs +7 -7
  226. package/dist/actions/search-global.mjs.map +1 -1
  227. package/dist/actions/search-link.cjs +1 -1
  228. package/dist/actions/search-link.cjs.map +1 -1
  229. package/dist/actions/search-link.d.cts +2 -8
  230. package/dist/actions/search-link.d.mts +2 -8
  231. package/dist/actions/search-link.mjs +1 -1
  232. package/dist/actions/search-link.mjs.map +1 -1
  233. package/dist/actions/set-value.cjs +8 -8
  234. package/dist/actions/set-value.cjs.map +1 -1
  235. package/dist/actions/set-value.d.cts +15 -34
  236. package/dist/actions/set-value.d.mts +15 -34
  237. package/dist/actions/set-value.mjs +8 -8
  238. package/dist/actions/set-value.mjs.map +1 -1
  239. package/dist/actions/submit-document.d.cts +1 -12
  240. package/dist/actions/submit-document.d.mts +1 -12
  241. package/dist/actions/update-document.cjs +8 -8
  242. package/dist/actions/update-document.cjs.map +1 -1
  243. package/dist/actions/update-document.d.cts +9 -19
  244. package/dist/actions/update-document.d.mts +9 -19
  245. package/dist/actions/update-document.mjs +8 -8
  246. package/dist/actions/update-document.mjs.map +1 -1
  247. package/package.json +1 -1
@@ -19,15 +19,15 @@ const ErpnextMakeStockEntryInput = zod.z.object({
19
19
  basic_rate: zod.z.number().describe("Valuation rate per unit of the item. Required for Material Receipt when the item has no valuation rate defined to avoid validation errors.").optional()
20
20
  }).describe("Request model for creating a Stock Entry in ERPNext.");
21
21
  const ErpnextMakeStockEntry_StockEntryDataSchema = zod.z.object({
22
- name: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Unique identifier of the created Stock Entry document.").optional()),
23
- owner: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("User who created the Stock Entry.").optional()),
24
- doctype: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Document type, should be 'Stock Entry'.").optional()),
25
- purpose: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Purpose of the stock entry as set during creation.").optional()),
26
- creation: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Timestamp when the Stock Entry was created.").optional()),
27
- modified: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Timestamp when the Stock Entry was last modified.").optional()),
28
- docstatus: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.number().int().describe("Document status: 0 = Draft, 1 = Submitted, 2 = Cancelled.").optional()),
29
- modified_by: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("User who last modified the Stock Entry.").optional()),
30
- stock_entry_type: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Type of stock entry created.").optional())
22
+ name: zod.z.string().describe("Unique identifier of the created Stock Entry document.").nullable().optional(),
23
+ owner: zod.z.string().describe("User who created the Stock Entry.").nullable().optional(),
24
+ doctype: zod.z.string().describe("Document type, should be 'Stock Entry'.").nullable().optional(),
25
+ purpose: zod.z.string().describe("Purpose of the stock entry as set during creation.").nullable().optional(),
26
+ creation: zod.z.string().describe("Timestamp when the Stock Entry was created.").nullable().optional(),
27
+ modified: zod.z.string().describe("Timestamp when the Stock Entry was last modified.").nullable().optional(),
28
+ docstatus: zod.z.number().int().describe("Document status: 0 = Draft, 1 = Submitted, 2 = Cancelled.").nullable().optional(),
29
+ modified_by: zod.z.string().describe("User who last modified the Stock Entry.").nullable().optional(),
30
+ stock_entry_type: zod.z.string().describe("Type of stock entry created.").nullable().optional()
31
31
  }).describe("Response data containing the created Stock Entry details.");
32
32
  const ErpnextMakeStockEntryOutput = zod.z.object({ message: ErpnextMakeStockEntry_StockEntryDataSchema.nullable() }).describe("Response containing the created Stock Entry document.");
33
33
  const erpnextMakeStockEntry = require_action.action("ERPNEXT_MAKE_STOCK_ENTRY", {
@@ -1 +1 @@
1
- {"version":3,"file":"make-stock-entry.cjs","names":["z","action"],"sources":["../../src/actions/make-stock-entry.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextMakeStockEntryInput = z.object({\n qty: z.number().describe(\"Quantity of the item to be transferred, received, or issued. Must be a positive number.\"),\n source: z.string().describe(\"Source warehouse from which the item is being transferred or issued. Required for Material Transfer and Material Issue purposes.\").optional(),\n target: z.string().describe(\"Target warehouse to which the item is being transferred or received. Required for Material Transfer and Material Receipt purposes.\").optional(),\n purpose: z.enum([\"Material Receipt\", \"Material Issue\", \"Material Transfer\", \"Material Transfer for Manufacture\", \"Material Consumption for Manufacture\", \"Manufacture\", \"Repack\", \"Send to Subcontractor\"]).describe(\"Enumeration of stock entry purposes.\").optional(),\n item_code: z.string().describe(\"Item code for the stock entry. Must be a valid Item in the ERPNext system.\"),\n basic_rate: z.number().describe(\"Valuation rate per unit of the item. Required for Material Receipt when the item has no valuation rate defined to avoid validation errors.\").optional(),\n}).describe(\"Request model for creating a Stock Entry in ERPNext.\");\nconst ErpnextMakeStockEntry_StockEntryDataSchema = z.object({\n name: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Unique identifier of the created Stock Entry document.\").optional()),\n owner: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"User who created the Stock Entry.\").optional()),\n doctype: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Document type, should be 'Stock Entry'.\").optional()),\n purpose: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Purpose of the stock entry as set during creation.\").optional()),\n creation: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Timestamp when the Stock Entry was created.\").optional()),\n modified: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Timestamp when the Stock Entry was last modified.\").optional()),\n docstatus: z.preprocess((value) => (value === null ? undefined : value), z.number().int().describe(\"Document status: 0 = Draft, 1 = Submitted, 2 = Cancelled.\").optional()),\n modified_by: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"User who last modified the Stock Entry.\").optional()),\n stock_entry_type: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Type of stock entry created.\").optional()),\n}).describe(\"Response data containing the created Stock Entry details.\");\nexport const ErpnextMakeStockEntryOutput = z.object({\n message: ErpnextMakeStockEntry_StockEntryDataSchema.nullable(),\n}).describe(\"Response containing the created Stock Entry document.\");\n\nexport const erpnextMakeStockEntry = action(\"ERPNEXT_MAKE_STOCK_ENTRY\", {\n slug: \"erpnext-make-stock-entry\",\n name: \"Make Stock Entry\",\n description: \"Tool to create a Stock Entry for material transfer, receipt, or issue in ERPNext. Use when you need to record inventory movements between warehouses or add/remove stock. For Material Receipt, include target warehouse and basic_rate. For Material Issue, include source warehouse. For Material Transfer, include both source and target warehouses.\",\n input: ErpnextMakeStockEntryInput,\n output: ErpnextMakeStockEntryOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA6BA,IAAAA,EAAE,OAAO;CACjD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF;CAClH,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kIAAkI,CAAC,CAAC,SAAS;CACzK,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;CAC3K,SAASA,IAAAA,EAAE,KAAK;EAAC;EAAoB;EAAkB;EAAqB;EAAqC;EAAwC;EAAe;EAAU;CAAuB,CAAC,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACtQ,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E;CAC3G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4IAA4I,CAAC,CAAC,SAAS;AACzL,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAClE,MAAM,6CAA6CA,IAAAA,EAAE,OAAO;CAC1D,MAAMA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC;CAC5J,OAAOA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC;CACxI,SAASA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC;CAChJ,SAASA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC;CAC3J,UAAUA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC;CACrJ,UAAUA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,CAAC;CAC3J,WAAWA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC;CAC1K,aAAaA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC;CACpJ,kBAAkBA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC;AAChJ,CAAC,CAAC,CAAC,SAAS,2DAA2D;AACvE,MAAa,8BAA8BA,IAAAA,EAAE,OAAO,EAClD,SAAS,2CAA2C,SAAS,EAC/D,CAAC,CAAC,CAAC,SAAS,uDAAuD;AAEnE,MAAa,wBAAwBC,eAAAA,OAAO,4BAA4B;CACtE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"make-stock-entry.cjs","names":["z","action"],"sources":["../../src/actions/make-stock-entry.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextMakeStockEntryInput = z.object({\n qty: z.number().describe(\"Quantity of the item to be transferred, received, or issued. Must be a positive number.\"),\n source: z.string().describe(\"Source warehouse from which the item is being transferred or issued. Required for Material Transfer and Material Issue purposes.\").optional(),\n target: z.string().describe(\"Target warehouse to which the item is being transferred or received. Required for Material Transfer and Material Receipt purposes.\").optional(),\n purpose: z.enum([\"Material Receipt\", \"Material Issue\", \"Material Transfer\", \"Material Transfer for Manufacture\", \"Material Consumption for Manufacture\", \"Manufacture\", \"Repack\", \"Send to Subcontractor\"]).describe(\"Enumeration of stock entry purposes.\").optional(),\n item_code: z.string().describe(\"Item code for the stock entry. Must be a valid Item in the ERPNext system.\"),\n basic_rate: z.number().describe(\"Valuation rate per unit of the item. Required for Material Receipt when the item has no valuation rate defined to avoid validation errors.\").optional(),\n}).describe(\"Request model for creating a Stock Entry in ERPNext.\");\nconst ErpnextMakeStockEntry_StockEntryDataSchema = z.object({\n name: z.string().describe(\"Unique identifier of the created Stock Entry document.\").nullable().optional(),\n owner: z.string().describe(\"User who created the Stock Entry.\").nullable().optional(),\n doctype: z.string().describe(\"Document type, should be 'Stock Entry'.\").nullable().optional(),\n purpose: z.string().describe(\"Purpose of the stock entry as set during creation.\").nullable().optional(),\n creation: z.string().describe(\"Timestamp when the Stock Entry was created.\").nullable().optional(),\n modified: z.string().describe(\"Timestamp when the Stock Entry was last modified.\").nullable().optional(),\n docstatus: z.number().int().describe(\"Document status: 0 = Draft, 1 = Submitted, 2 = Cancelled.\").nullable().optional(),\n modified_by: z.string().describe(\"User who last modified the Stock Entry.\").nullable().optional(),\n stock_entry_type: z.string().describe(\"Type of stock entry created.\").nullable().optional(),\n}).describe(\"Response data containing the created Stock Entry details.\");\nexport const ErpnextMakeStockEntryOutput = z.object({\n message: ErpnextMakeStockEntry_StockEntryDataSchema.nullable(),\n}).describe(\"Response containing the created Stock Entry document.\");\n\nexport const erpnextMakeStockEntry = action(\"ERPNEXT_MAKE_STOCK_ENTRY\", {\n slug: \"erpnext-make-stock-entry\",\n name: \"Make Stock Entry\",\n description: \"Tool to create a Stock Entry for material transfer, receipt, or issue in ERPNext. Use when you need to record inventory movements between warehouses or add/remove stock. For Material Receipt, include target warehouse and basic_rate. For Material Issue, include source warehouse. For Material Transfer, include both source and target warehouses.\",\n input: ErpnextMakeStockEntryInput,\n output: ErpnextMakeStockEntryOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA6BA,IAAAA,EAAE,OAAO;CACjD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF;CAClH,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kIAAkI,CAAC,CAAC,SAAS;CACzK,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;CAC3K,SAASA,IAAAA,EAAE,KAAK;EAAC;EAAoB;EAAkB;EAAqB;EAAqC;EAAwC;EAAe;EAAU;CAAuB,CAAC,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACtQ,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E;CAC3G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4IAA4I,CAAC,CAAC,SAAS;AACzL,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAClE,MAAM,6CAA6CA,IAAAA,EAAE,OAAO;CAC1D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtH,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC5F,CAAC,CAAC,CAAC,SAAS,2DAA2D;AACvE,MAAa,8BAA8BA,IAAAA,EAAE,OAAO,EAClD,SAAS,2CAA2C,SAAS,EAC/D,CAAC,CAAC,CAAC,SAAS,uDAAuD;AAEnE,MAAa,wBAAwBC,eAAAA,OAAO,4BAA4B;CACtE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -20,15 +20,15 @@ declare const ErpnextMakeStockEntryInput: z.ZodObject<{
20
20
  }, z.core.$strip>;
21
21
  declare const ErpnextMakeStockEntryOutput: z.ZodObject<{
22
22
  message: z.ZodNullable<z.ZodObject<{
23
- name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
24
- owner: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
25
- doctype: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
26
- purpose: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
27
- creation: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
28
- modified: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
29
- docstatus: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
30
- modified_by: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
31
- stock_entry_type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
23
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ owner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ doctype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ purpose: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ creation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ docstatus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
30
+ modified_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ stock_entry_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
32
  }, z.core.$strip>>;
33
33
  }, z.core.$strip>;
34
34
  declare const erpnextMakeStockEntry: import("@keystrokehq/action").WorkflowActionDefinition<{
@@ -38,19 +38,7 @@ declare const erpnextMakeStockEntry: import("@keystrokehq/action").WorkflowActio
38
38
  target?: string | undefined;
39
39
  purpose?: "Material Receipt" | "Material Issue" | "Material Transfer" | "Material Transfer for Manufacture" | "Material Consumption for Manufacture" | "Manufacture" | "Repack" | "Send to Subcontractor" | undefined;
40
40
  basic_rate?: number | undefined;
41
- }, {
42
- message: {
43
- name?: string | undefined;
44
- owner?: string | undefined;
45
- doctype?: string | undefined;
46
- purpose?: string | undefined;
47
- creation?: string | undefined;
48
- modified?: string | undefined;
49
- docstatus?: number | undefined;
50
- modified_by?: string | undefined;
51
- stock_entry_type?: string | undefined;
52
- } | null;
53
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
41
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
54
42
  //#endregion
55
43
  export { erpnextMakeStockEntry };
56
44
  //# sourceMappingURL=make-stock-entry.d.cts.map
@@ -20,15 +20,15 @@ declare const ErpnextMakeStockEntryInput: z.ZodObject<{
20
20
  }, z.core.$strip>;
21
21
  declare const ErpnextMakeStockEntryOutput: z.ZodObject<{
22
22
  message: z.ZodNullable<z.ZodObject<{
23
- name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
24
- owner: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
25
- doctype: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
26
- purpose: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
27
- creation: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
28
- modified: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
29
- docstatus: z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>;
30
- modified_by: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
31
- stock_entry_type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
23
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ owner: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ doctype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ purpose: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ creation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ docstatus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
30
+ modified_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ stock_entry_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
32
  }, z.core.$strip>>;
33
33
  }, z.core.$strip>;
34
34
  declare const erpnextMakeStockEntry: import("@keystrokehq/action").WorkflowActionDefinition<{
@@ -38,19 +38,7 @@ declare const erpnextMakeStockEntry: import("@keystrokehq/action").WorkflowActio
38
38
  target?: string | undefined;
39
39
  purpose?: "Material Receipt" | "Material Issue" | "Material Transfer" | "Material Transfer for Manufacture" | "Material Consumption for Manufacture" | "Manufacture" | "Repack" | "Send to Subcontractor" | undefined;
40
40
  basic_rate?: number | undefined;
41
- }, {
42
- message: {
43
- name?: string | undefined;
44
- owner?: string | undefined;
45
- doctype?: string | undefined;
46
- purpose?: string | undefined;
47
- creation?: string | undefined;
48
- modified?: string | undefined;
49
- docstatus?: number | undefined;
50
- modified_by?: string | undefined;
51
- stock_entry_type?: string | undefined;
52
- } | null;
53
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
41
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
54
42
  //#endregion
55
43
  export { erpnextMakeStockEntry };
56
44
  //# sourceMappingURL=make-stock-entry.d.mts.map
@@ -19,15 +19,15 @@ const ErpnextMakeStockEntryInput = z.object({
19
19
  basic_rate: z.number().describe("Valuation rate per unit of the item. Required for Material Receipt when the item has no valuation rate defined to avoid validation errors.").optional()
20
20
  }).describe("Request model for creating a Stock Entry in ERPNext.");
21
21
  const ErpnextMakeStockEntry_StockEntryDataSchema = z.object({
22
- name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Unique identifier of the created Stock Entry document.").optional()),
23
- owner: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("User who created the Stock Entry.").optional()),
24
- doctype: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Document type, should be 'Stock Entry'.").optional()),
25
- purpose: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Purpose of the stock entry as set during creation.").optional()),
26
- creation: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Timestamp when the Stock Entry was created.").optional()),
27
- modified: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Timestamp when the Stock Entry was last modified.").optional()),
28
- docstatus: z.preprocess((value) => value === null ? void 0 : value, z.number().int().describe("Document status: 0 = Draft, 1 = Submitted, 2 = Cancelled.").optional()),
29
- modified_by: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("User who last modified the Stock Entry.").optional()),
30
- stock_entry_type: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Type of stock entry created.").optional())
22
+ name: z.string().describe("Unique identifier of the created Stock Entry document.").nullable().optional(),
23
+ owner: z.string().describe("User who created the Stock Entry.").nullable().optional(),
24
+ doctype: z.string().describe("Document type, should be 'Stock Entry'.").nullable().optional(),
25
+ purpose: z.string().describe("Purpose of the stock entry as set during creation.").nullable().optional(),
26
+ creation: z.string().describe("Timestamp when the Stock Entry was created.").nullable().optional(),
27
+ modified: z.string().describe("Timestamp when the Stock Entry was last modified.").nullable().optional(),
28
+ docstatus: z.number().int().describe("Document status: 0 = Draft, 1 = Submitted, 2 = Cancelled.").nullable().optional(),
29
+ modified_by: z.string().describe("User who last modified the Stock Entry.").nullable().optional(),
30
+ stock_entry_type: z.string().describe("Type of stock entry created.").nullable().optional()
31
31
  }).describe("Response data containing the created Stock Entry details.");
32
32
  const erpnextMakeStockEntry = action("ERPNEXT_MAKE_STOCK_ENTRY", {
33
33
  slug: "erpnext-make-stock-entry",
@@ -1 +1 @@
1
- {"version":3,"file":"make-stock-entry.mjs","names":[],"sources":["../../src/actions/make-stock-entry.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextMakeStockEntryInput = z.object({\n qty: z.number().describe(\"Quantity of the item to be transferred, received, or issued. Must be a positive number.\"),\n source: z.string().describe(\"Source warehouse from which the item is being transferred or issued. Required for Material Transfer and Material Issue purposes.\").optional(),\n target: z.string().describe(\"Target warehouse to which the item is being transferred or received. Required for Material Transfer and Material Receipt purposes.\").optional(),\n purpose: z.enum([\"Material Receipt\", \"Material Issue\", \"Material Transfer\", \"Material Transfer for Manufacture\", \"Material Consumption for Manufacture\", \"Manufacture\", \"Repack\", \"Send to Subcontractor\"]).describe(\"Enumeration of stock entry purposes.\").optional(),\n item_code: z.string().describe(\"Item code for the stock entry. Must be a valid Item in the ERPNext system.\"),\n basic_rate: z.number().describe(\"Valuation rate per unit of the item. Required for Material Receipt when the item has no valuation rate defined to avoid validation errors.\").optional(),\n}).describe(\"Request model for creating a Stock Entry in ERPNext.\");\nconst ErpnextMakeStockEntry_StockEntryDataSchema = z.object({\n name: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Unique identifier of the created Stock Entry document.\").optional()),\n owner: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"User who created the Stock Entry.\").optional()),\n doctype: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Document type, should be 'Stock Entry'.\").optional()),\n purpose: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Purpose of the stock entry as set during creation.\").optional()),\n creation: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Timestamp when the Stock Entry was created.\").optional()),\n modified: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Timestamp when the Stock Entry was last modified.\").optional()),\n docstatus: z.preprocess((value) => (value === null ? undefined : value), z.number().int().describe(\"Document status: 0 = Draft, 1 = Submitted, 2 = Cancelled.\").optional()),\n modified_by: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"User who last modified the Stock Entry.\").optional()),\n stock_entry_type: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Type of stock entry created.\").optional()),\n}).describe(\"Response data containing the created Stock Entry details.\");\nexport const ErpnextMakeStockEntryOutput = z.object({\n message: ErpnextMakeStockEntry_StockEntryDataSchema.nullable(),\n}).describe(\"Response containing the created Stock Entry document.\");\n\nexport const erpnextMakeStockEntry = action(\"ERPNEXT_MAKE_STOCK_ENTRY\", {\n slug: \"erpnext-make-stock-entry\",\n name: \"Make Stock Entry\",\n description: \"Tool to create a Stock Entry for material transfer, receipt, or issue in ERPNext. Use when you need to record inventory movements between warehouses or add/remove stock. For Material Receipt, include target warehouse and basic_rate. For Material Issue, include source warehouse. For Material Transfer, include both source and target warehouses.\",\n input: ErpnextMakeStockEntryInput,\n output: ErpnextMakeStockEntryOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA6B,EAAE,OAAO;CACjD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF;CAClH,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,kIAAkI,CAAC,CAAC,SAAS;CACzK,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;CAC3K,SAAS,EAAE,KAAK;EAAC;EAAoB;EAAkB;EAAqB;EAAqC;EAAwC;EAAe;EAAU;CAAuB,CAAC,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACtQ,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E;CAC3G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4IAA4I,CAAC,CAAC,SAAS;AACzL,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAClE,MAAM,6CAA6C,EAAE,OAAO;CAC1D,MAAM,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC;CAC5J,OAAO,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC;CACxI,SAAS,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC;CAChJ,SAAS,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC;CAC3J,UAAU,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC;CACrJ,UAAU,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,CAAC;CAC3J,WAAW,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC;CAC1K,aAAa,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC;CACpJ,kBAAkB,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC;AAChJ,CAAC,CAAC,CAAC,SAAS,2DAA2D;AAKvE,MAAa,wBAAwB,OAAO,4BAA4B;CACtE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATyC,EAAE,OAAO,EAClD,SAAS,2CAA2C,SAAS,EAC/D,CAAC,CAAC,CAAC,SAAS,uDAOF;AACV,CAAC"}
1
+ {"version":3,"file":"make-stock-entry.mjs","names":[],"sources":["../../src/actions/make-stock-entry.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextMakeStockEntryInput = z.object({\n qty: z.number().describe(\"Quantity of the item to be transferred, received, or issued. Must be a positive number.\"),\n source: z.string().describe(\"Source warehouse from which the item is being transferred or issued. Required for Material Transfer and Material Issue purposes.\").optional(),\n target: z.string().describe(\"Target warehouse to which the item is being transferred or received. Required for Material Transfer and Material Receipt purposes.\").optional(),\n purpose: z.enum([\"Material Receipt\", \"Material Issue\", \"Material Transfer\", \"Material Transfer for Manufacture\", \"Material Consumption for Manufacture\", \"Manufacture\", \"Repack\", \"Send to Subcontractor\"]).describe(\"Enumeration of stock entry purposes.\").optional(),\n item_code: z.string().describe(\"Item code for the stock entry. Must be a valid Item in the ERPNext system.\"),\n basic_rate: z.number().describe(\"Valuation rate per unit of the item. Required for Material Receipt when the item has no valuation rate defined to avoid validation errors.\").optional(),\n}).describe(\"Request model for creating a Stock Entry in ERPNext.\");\nconst ErpnextMakeStockEntry_StockEntryDataSchema = z.object({\n name: z.string().describe(\"Unique identifier of the created Stock Entry document.\").nullable().optional(),\n owner: z.string().describe(\"User who created the Stock Entry.\").nullable().optional(),\n doctype: z.string().describe(\"Document type, should be 'Stock Entry'.\").nullable().optional(),\n purpose: z.string().describe(\"Purpose of the stock entry as set during creation.\").nullable().optional(),\n creation: z.string().describe(\"Timestamp when the Stock Entry was created.\").nullable().optional(),\n modified: z.string().describe(\"Timestamp when the Stock Entry was last modified.\").nullable().optional(),\n docstatus: z.number().int().describe(\"Document status: 0 = Draft, 1 = Submitted, 2 = Cancelled.\").nullable().optional(),\n modified_by: z.string().describe(\"User who last modified the Stock Entry.\").nullable().optional(),\n stock_entry_type: z.string().describe(\"Type of stock entry created.\").nullable().optional(),\n}).describe(\"Response data containing the created Stock Entry details.\");\nexport const ErpnextMakeStockEntryOutput = z.object({\n message: ErpnextMakeStockEntry_StockEntryDataSchema.nullable(),\n}).describe(\"Response containing the created Stock Entry document.\");\n\nexport const erpnextMakeStockEntry = action(\"ERPNEXT_MAKE_STOCK_ENTRY\", {\n slug: \"erpnext-make-stock-entry\",\n name: \"Make Stock Entry\",\n description: \"Tool to create a Stock Entry for material transfer, receipt, or issue in ERPNext. Use when you need to record inventory movements between warehouses or add/remove stock. For Material Receipt, include target warehouse and basic_rate. For Material Issue, include source warehouse. For Material Transfer, include both source and target warehouses.\",\n input: ErpnextMakeStockEntryInput,\n output: ErpnextMakeStockEntryOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA6B,EAAE,OAAO;CACjD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF;CAClH,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,kIAAkI,CAAC,CAAC,SAAS;CACzK,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;CAC3K,SAAS,EAAE,KAAK;EAAC;EAAoB;EAAkB;EAAqB;EAAqC;EAAwC;EAAe;EAAU;CAAuB,CAAC,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACtQ,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E;CAC3G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4IAA4I,CAAC,CAAC,SAAS;AACzL,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAClE,MAAM,6CAA6C,EAAE,OAAO;CAC1D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5F,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtH,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC5F,CAAC,CAAC,CAAC,SAAS,2DAA2D;AAKvE,MAAa,wBAAwB,OAAO,4BAA4B;CACtE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATyC,EAAE,OAAO,EAClD,SAAS,2CAA2C,SAAS,EAC/D,CAAC,CAAC,CAAC,SAAS,uDAOF;AACV,CAAC"}
@@ -5,9 +5,7 @@ declare const ErpnextPingInput: z.ZodObject<{}, z.core.$strip>;
5
5
  declare const ErpnextPingOutput: z.ZodObject<{
6
6
  message: z.ZodNullable<z.ZodString>;
7
7
  }, z.core.$strip>;
8
- declare const erpnextPing: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, {
9
- message: string | null;
10
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
8
+ declare const erpnextPing: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
11
9
  //#endregion
12
10
  export { erpnextPing };
13
11
  //# sourceMappingURL=ping.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ping.d.cts","names":[],"sources":["../../src/actions/ping.ts"],"mappings":";;;cAIa,gBAAA,EAAgB,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAChB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;cAIjB,WAAA,gCAAW,wBAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"ping.d.cts","names":[],"sources":["../../src/actions/ping.ts"],"mappings":";;;cAIa,gBAAA,EAAgB,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAChB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;cAIjB,WAAA,gCAAW,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -5,9 +5,7 @@ declare const ErpnextPingInput: z.ZodObject<{}, z.core.$strip>;
5
5
  declare const ErpnextPingOutput: z.ZodObject<{
6
6
  message: z.ZodNullable<z.ZodString>;
7
7
  }, z.core.$strip>;
8
- declare const erpnextPing: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, {
9
- message: string | null;
10
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
8
+ declare const erpnextPing: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
11
9
  //#endregion
12
10
  export { erpnextPing };
13
11
  //# sourceMappingURL=ping.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ping.d.mts","names":[],"sources":["../../src/actions/ping.ts"],"mappings":";;;cAIa,gBAAA,EAAgB,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAChB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;cAIjB,WAAA,gCAAW,wBAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"ping.d.mts","names":[],"sources":["../../src/actions/ping.ts"],"mappings":";;;cAIa,gBAAA,EAAgB,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAChB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;cAIjB,WAAA,gCAAW,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -15,9 +15,7 @@ declare const erpnextRenameDoc: import("@keystrokehq/action").WorkflowActionDefi
15
15
  new_name: string;
16
16
  old_name: string;
17
17
  merge?: boolean | undefined;
18
- }, {
19
- message: unknown;
20
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
18
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
21
19
  //#endregion
22
20
  export { erpnextRenameDoc };
23
21
  //# sourceMappingURL=rename-doc.d.cts.map
@@ -15,9 +15,7 @@ declare const erpnextRenameDoc: import("@keystrokehq/action").WorkflowActionDefi
15
15
  new_name: string;
16
16
  old_name: string;
17
17
  merge?: boolean | undefined;
18
- }, {
19
- message: unknown;
20
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
18
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
21
19
  //#endregion
22
20
  export { erpnextRenameDoc };
23
21
  //# sourceMappingURL=rename-doc.d.mts.map
@@ -11,11 +11,11 @@ const ErpnextSaveDocsInput = zod.z.object({
11
11
  ]).default("Save").describe("Action to perform on the document: Save (create or update), Submit (submit for approval), Cancel (cancel submitted document), Update (update after submission)").optional()
12
12
  }).describe("Request model for saving a document in ERPNext.");
13
13
  const ErpnextSaveDocsOutput = zod.z.object({
14
- exc: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Exception message if the operation failed").optional()),
15
- docs: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("List of saved documents with their updated fields. Each document contains dynamic fields based on the DocType, including standard fields like name, owner, creation, modified, doctype, and DocType-specific fields.").optional()),
16
- docinfo: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.record(zod.z.string(), zod.z.unknown()).describe("Document metadata including attachments, comments, workflow state, permissions, and activity logs").optional()),
17
- exc_type: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Type of exception if the operation failed").optional()),
18
- server_messages: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.array(zod.z.string()).describe("Messages from the server regarding the save operation").optional())
14
+ exc: zod.z.string().describe("Exception message if the operation failed").nullable().optional(),
15
+ docs: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("List of saved documents with their updated fields. Each document contains dynamic fields based on the DocType, including standard fields like name, owner, creation, modified, doctype, and DocType-specific fields.").nullable().optional(),
16
+ docinfo: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Document metadata including attachments, comments, workflow state, permissions, and activity logs").nullable().optional(),
17
+ exc_type: zod.z.string().describe("Type of exception if the operation failed").nullable().optional(),
18
+ server_messages: zod.z.array(zod.z.string()).describe("Messages from the server regarding the save operation").nullable().optional()
19
19
  }).describe("Response model returned after saving a document in ERPNext.");
20
20
  const erpnextSaveDocs = require_action.action("ERPNEXT_SAVE_DOCS", {
21
21
  slug: "erpnext-save-docs",
@@ -1 +1 @@
1
- {"version":3,"file":"save-docs.cjs","names":["z","action"],"sources":["../../src/actions/save-docs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextSaveDocsInput = z.object({\n doc: z.record(z.string(), z.unknown()).describe(\"Document to save as a dictionary. Must include required fields: 'doctype' (the DocType name), 'name' (document ID if updating), and other relevant fields for the specific DocType. Example: {'doctype': 'ToDo', 'name': 'abc123', 'description': 'Task description', 'status': 'Open'}\"),\n action: z.enum([\"Save\", \"Submit\", \"Cancel\", \"Update\"]).default(\"Save\").describe(\"Action to perform on the document: Save (create or update), Submit (submit for approval), Cancel (cancel submitted document), Update (update after submission)\").optional(),\n}).describe(\"Request model for saving a document in ERPNext.\");\nexport const ErpnextSaveDocsOutput = z.object({\n exc: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Exception message if the operation failed\").optional()),\n docs: z.preprocess((value) => (value === null ? undefined : value), z.array(z.record(z.string(), z.unknown())).describe(\"List of saved documents with their updated fields. Each document contains dynamic fields based on the DocType, including standard fields like name, owner, creation, modified, doctype, and DocType-specific fields.\").optional()),\n docinfo: z.preprocess((value) => (value === null ? undefined : value), z.record(z.string(), z.unknown()).describe(\"Document metadata including attachments, comments, workflow state, permissions, and activity logs\").optional()),\n exc_type: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Type of exception if the operation failed\").optional()),\n server_messages: z.preprocess((value) => (value === null ? undefined : value), z.array(z.string()).describe(\"Messages from the server regarding the save operation\").optional()),\n}).describe(\"Response model returned after saving a document in ERPNext.\");\n\nexport const erpnextSaveDocs = action(\"ERPNEXT_SAVE_DOCS\", {\n slug: \"erpnext-save-docs\",\n name: \"Save Document with Action\",\n description: \"Tool to save, submit, cancel, or update a document in ERPNext. Use when you need to create or modify documents in ERPNext. The doc parameter must be a JSON-serializable dictionary containing the document fields.\",\n input: ErpnextSaveDocsInput,\n output: ErpnextSaveDocsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uBAAuBA,IAAAA,EAAE,OAAO;CAC3C,KAAKA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,yRAAyR;CACzU,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAQ;EAAU;EAAU;CAAQ,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,SAAS,gKAAgK,CAAC,CAAC,SAAS;AAC7P,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAa,wBAAwBA,IAAAA,EAAE,OAAO;CAC5C,KAAKA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC;CAC9I,MAAMA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,sNAAsN,CAAC,CAAC,SAAS,CAAC;CAC1V,SAASA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS,CAAC;CACjO,UAAUA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC;CACnJ,iBAAiBA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC;AACjL,CAAC,CAAC,CAAC,SAAS,6DAA6D;AAEzE,MAAa,kBAAkBC,eAAAA,OAAO,qBAAqB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"save-docs.cjs","names":["z","action"],"sources":["../../src/actions/save-docs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextSaveDocsInput = z.object({\n doc: z.record(z.string(), z.unknown()).describe(\"Document to save as a dictionary. Must include required fields: 'doctype' (the DocType name), 'name' (document ID if updating), and other relevant fields for the specific DocType. Example: {'doctype': 'ToDo', 'name': 'abc123', 'description': 'Task description', 'status': 'Open'}\"),\n action: z.enum([\"Save\", \"Submit\", \"Cancel\", \"Update\"]).default(\"Save\").describe(\"Action to perform on the document: Save (create or update), Submit (submit for approval), Cancel (cancel submitted document), Update (update after submission)\").optional(),\n}).describe(\"Request model for saving a document in ERPNext.\");\nexport const ErpnextSaveDocsOutput = z.object({\n exc: z.string().describe(\"Exception message if the operation failed\").nullable().optional(),\n docs: z.array(z.record(z.string(), z.unknown())).describe(\"List of saved documents with their updated fields. Each document contains dynamic fields based on the DocType, including standard fields like name, owner, creation, modified, doctype, and DocType-specific fields.\").nullable().optional(),\n docinfo: z.record(z.string(), z.unknown()).describe(\"Document metadata including attachments, comments, workflow state, permissions, and activity logs\").nullable().optional(),\n exc_type: z.string().describe(\"Type of exception if the operation failed\").nullable().optional(),\n server_messages: z.array(z.string()).describe(\"Messages from the server regarding the save operation\").nullable().optional(),\n}).describe(\"Response model returned after saving a document in ERPNext.\");\n\nexport const erpnextSaveDocs = action(\"ERPNEXT_SAVE_DOCS\", {\n slug: \"erpnext-save-docs\",\n name: \"Save Document with Action\",\n description: \"Tool to save, submit, cancel, or update a document in ERPNext. Use when you need to create or modify documents in ERPNext. The doc parameter must be a JSON-serializable dictionary containing the document fields.\",\n input: ErpnextSaveDocsInput,\n output: ErpnextSaveDocsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uBAAuBA,IAAAA,EAAE,OAAO;CAC3C,KAAKA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,yRAAyR;CACzU,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAQ;EAAU;EAAU;CAAQ,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,SAAS,gKAAgK,CAAC,CAAC,SAAS;AAC7P,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAa,wBAAwBA,IAAAA,EAAE,OAAO;CAC5C,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,sNAAsN,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtS,SAASA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7K,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,iBAAiBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7H,CAAC,CAAC,CAAC,SAAS,6DAA6D;AAEzE,MAAa,kBAAkBC,eAAAA,OAAO,qBAAqB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -11,22 +11,16 @@ declare const ErpnextSaveDocsInput: z.ZodObject<{
11
11
  }>>>;
12
12
  }, z.core.$strip>;
13
13
  declare const ErpnextSaveDocsOutput: z.ZodObject<{
14
- exc: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
15
- docs: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
16
- docinfo: z.ZodPreprocess<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
17
- exc_type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
18
- server_messages: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>>;
14
+ exc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ docs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
16
+ docinfo: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
17
+ exc_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ server_messages: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
19
19
  }, z.core.$strip>;
20
20
  declare const erpnextSaveDocs: import("@keystrokehq/action").WorkflowActionDefinition<{
21
21
  doc: Record<string, unknown>;
22
22
  action?: "Save" | "Submit" | "Cancel" | "Update" | undefined;
23
- }, {
24
- exc?: string | undefined;
25
- docs?: Record<string, unknown>[] | undefined;
26
- docinfo?: Record<string, unknown> | undefined;
27
- exc_type?: string | undefined;
28
- server_messages?: string[] | undefined;
29
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
23
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
30
24
  //#endregion
31
25
  export { erpnextSaveDocs };
32
26
  //# sourceMappingURL=save-docs.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"save-docs.d.cts","names":[],"sources":["../../src/actions/save-docs.ts"],"mappings":";;;cAIa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;cAIpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;cAQrB,eAAA,gCAAe,wBAAA"}
1
+ {"version":3,"file":"save-docs.d.cts","names":[],"sources":["../../src/actions/save-docs.ts"],"mappings":";;;cAIa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;cAIpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;cAQrB,eAAA,gCAAe,wBAAA;OAM1B,MAAA"}
@@ -11,22 +11,16 @@ declare const ErpnextSaveDocsInput: z.ZodObject<{
11
11
  }>>>;
12
12
  }, z.core.$strip>;
13
13
  declare const ErpnextSaveDocsOutput: z.ZodObject<{
14
- exc: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
15
- docs: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
16
- docinfo: z.ZodPreprocess<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
17
- exc_type: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
18
- server_messages: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>>;
14
+ exc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ docs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
16
+ docinfo: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
17
+ exc_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ server_messages: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
19
19
  }, z.core.$strip>;
20
20
  declare const erpnextSaveDocs: import("@keystrokehq/action").WorkflowActionDefinition<{
21
21
  doc: Record<string, unknown>;
22
22
  action?: "Save" | "Submit" | "Cancel" | "Update" | undefined;
23
- }, {
24
- exc?: string | undefined;
25
- docs?: Record<string, unknown>[] | undefined;
26
- docinfo?: Record<string, unknown> | undefined;
27
- exc_type?: string | undefined;
28
- server_messages?: string[] | undefined;
29
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
23
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
30
24
  //#endregion
31
25
  export { erpnextSaveDocs };
32
26
  //# sourceMappingURL=save-docs.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"save-docs.d.mts","names":[],"sources":["../../src/actions/save-docs.ts"],"mappings":";;;cAIa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;cAIpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;cAQrB,eAAA,gCAAe,wBAAA"}
1
+ {"version":3,"file":"save-docs.d.mts","names":[],"sources":["../../src/actions/save-docs.ts"],"mappings":";;;cAIa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;cAIpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;cAQrB,eAAA,gCAAe,wBAAA;OAM1B,MAAA"}
@@ -14,11 +14,11 @@ const erpnextSaveDocs = action("ERPNEXT_SAVE_DOCS", {
14
14
  ]).default("Save").describe("Action to perform on the document: Save (create or update), Submit (submit for approval), Cancel (cancel submitted document), Update (update after submission)").optional()
15
15
  }).describe("Request model for saving a document in ERPNext."),
16
16
  output: z.object({
17
- exc: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Exception message if the operation failed").optional()),
18
- docs: z.preprocess((value) => value === null ? void 0 : value, z.array(z.record(z.string(), z.unknown())).describe("List of saved documents with their updated fields. Each document contains dynamic fields based on the DocType, including standard fields like name, owner, creation, modified, doctype, and DocType-specific fields.").optional()),
19
- docinfo: z.preprocess((value) => value === null ? void 0 : value, z.record(z.string(), z.unknown()).describe("Document metadata including attachments, comments, workflow state, permissions, and activity logs").optional()),
20
- exc_type: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Type of exception if the operation failed").optional()),
21
- server_messages: z.preprocess((value) => value === null ? void 0 : value, z.array(z.string()).describe("Messages from the server regarding the save operation").optional())
17
+ exc: z.string().describe("Exception message if the operation failed").nullable().optional(),
18
+ docs: z.array(z.record(z.string(), z.unknown())).describe("List of saved documents with their updated fields. Each document contains dynamic fields based on the DocType, including standard fields like name, owner, creation, modified, doctype, and DocType-specific fields.").nullable().optional(),
19
+ docinfo: z.record(z.string(), z.unknown()).describe("Document metadata including attachments, comments, workflow state, permissions, and activity logs").nullable().optional(),
20
+ exc_type: z.string().describe("Type of exception if the operation failed").nullable().optional(),
21
+ server_messages: z.array(z.string()).describe("Messages from the server regarding the save operation").nullable().optional()
22
22
  }).describe("Response model returned after saving a document in ERPNext.")
23
23
  });
24
24
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"save-docs.mjs","names":[],"sources":["../../src/actions/save-docs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextSaveDocsInput = z.object({\n doc: z.record(z.string(), z.unknown()).describe(\"Document to save as a dictionary. Must include required fields: 'doctype' (the DocType name), 'name' (document ID if updating), and other relevant fields for the specific DocType. Example: {'doctype': 'ToDo', 'name': 'abc123', 'description': 'Task description', 'status': 'Open'}\"),\n action: z.enum([\"Save\", \"Submit\", \"Cancel\", \"Update\"]).default(\"Save\").describe(\"Action to perform on the document: Save (create or update), Submit (submit for approval), Cancel (cancel submitted document), Update (update after submission)\").optional(),\n}).describe(\"Request model for saving a document in ERPNext.\");\nexport const ErpnextSaveDocsOutput = z.object({\n exc: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Exception message if the operation failed\").optional()),\n docs: z.preprocess((value) => (value === null ? undefined : value), z.array(z.record(z.string(), z.unknown())).describe(\"List of saved documents with their updated fields. Each document contains dynamic fields based on the DocType, including standard fields like name, owner, creation, modified, doctype, and DocType-specific fields.\").optional()),\n docinfo: z.preprocess((value) => (value === null ? undefined : value), z.record(z.string(), z.unknown()).describe(\"Document metadata including attachments, comments, workflow state, permissions, and activity logs\").optional()),\n exc_type: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Type of exception if the operation failed\").optional()),\n server_messages: z.preprocess((value) => (value === null ? undefined : value), z.array(z.string()).describe(\"Messages from the server regarding the save operation\").optional()),\n}).describe(\"Response model returned after saving a document in ERPNext.\");\n\nexport const erpnextSaveDocs = action(\"ERPNEXT_SAVE_DOCS\", {\n slug: \"erpnext-save-docs\",\n name: \"Save Document with Action\",\n description: \"Tool to save, submit, cancel, or update a document in ERPNext. Use when you need to create or modify documents in ERPNext. The doc parameter must be a JSON-serializable dictionary containing the document fields.\",\n input: ErpnextSaveDocsInput,\n output: ErpnextSaveDocsOutput,\n});\n"],"mappings":";;AAgBA,MAAa,kBAAkB,OAAO,qBAAqB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhBkC,EAAE,OAAO;EAC3C,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,yRAAyR;EACzU,QAAQ,EAAE,KAAK;GAAC;GAAQ;GAAU;GAAU;EAAQ,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,SAAS,gKAAgK,CAAC,CAAC,SAAS;CAC7P,CAAC,CAAC,CAAC,SAAS,iDAaH;CACP,QAbmC,EAAE,OAAO;EAC5C,KAAK,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC;EAC9I,MAAM,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,sNAAsN,CAAC,CAAC,SAAS,CAAC;EAC1V,SAAS,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS,CAAC;EACjO,UAAU,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC;EACnJ,iBAAiB,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC;CACjL,CAAC,CAAC,CAAC,SAAS,6DAOF;AACV,CAAC"}
1
+ {"version":3,"file":"save-docs.mjs","names":[],"sources":["../../src/actions/save-docs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextSaveDocsInput = z.object({\n doc: z.record(z.string(), z.unknown()).describe(\"Document to save as a dictionary. Must include required fields: 'doctype' (the DocType name), 'name' (document ID if updating), and other relevant fields for the specific DocType. Example: {'doctype': 'ToDo', 'name': 'abc123', 'description': 'Task description', 'status': 'Open'}\"),\n action: z.enum([\"Save\", \"Submit\", \"Cancel\", \"Update\"]).default(\"Save\").describe(\"Action to perform on the document: Save (create or update), Submit (submit for approval), Cancel (cancel submitted document), Update (update after submission)\").optional(),\n}).describe(\"Request model for saving a document in ERPNext.\");\nexport const ErpnextSaveDocsOutput = z.object({\n exc: z.string().describe(\"Exception message if the operation failed\").nullable().optional(),\n docs: z.array(z.record(z.string(), z.unknown())).describe(\"List of saved documents with their updated fields. Each document contains dynamic fields based on the DocType, including standard fields like name, owner, creation, modified, doctype, and DocType-specific fields.\").nullable().optional(),\n docinfo: z.record(z.string(), z.unknown()).describe(\"Document metadata including attachments, comments, workflow state, permissions, and activity logs\").nullable().optional(),\n exc_type: z.string().describe(\"Type of exception if the operation failed\").nullable().optional(),\n server_messages: z.array(z.string()).describe(\"Messages from the server regarding the save operation\").nullable().optional(),\n}).describe(\"Response model returned after saving a document in ERPNext.\");\n\nexport const erpnextSaveDocs = action(\"ERPNEXT_SAVE_DOCS\", {\n slug: \"erpnext-save-docs\",\n name: \"Save Document with Action\",\n description: \"Tool to save, submit, cancel, or update a document in ERPNext. Use when you need to create or modify documents in ERPNext. The doc parameter must be a JSON-serializable dictionary containing the document fields.\",\n input: ErpnextSaveDocsInput,\n output: ErpnextSaveDocsOutput,\n});\n"],"mappings":";;AAgBA,MAAa,kBAAkB,OAAO,qBAAqB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhBkC,EAAE,OAAO;EAC3C,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,yRAAyR;EACzU,QAAQ,EAAE,KAAK;GAAC;GAAQ;GAAU;GAAU;EAAQ,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,SAAS,gKAAgK,CAAC,CAAC,SAAS;CAC7P,CAAC,CAAC,CAAC,SAAS,iDAaH;CACP,QAbmC,EAAE,OAAO;EAC5C,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1F,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,sNAAsN,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtS,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7K,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/F,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7H,CAAC,CAAC,CAAC,SAAS,6DAOF;AACV,CAAC"}
@@ -12,8 +12,8 @@ const ErpnextSaveDocumentInput = zod.z.object({ doc: zod.z.object({
12
12
  modified_by: zod.z.string().describe("Email of the user who last modified the document.").optional()
13
13
  }).passthrough().describe("Complete document object to save. Must include 'doctype' and 'name' at minimum. Should also include system fields (owner, creation, modified, modified_by, docstatus, idx) and any doctype-specific fields you want to update. Additional fields beyond the base schema are allowed and will be passed to the API.") }).describe("Request model for saving an existing ERPNext/Frappe document with changes.\nRequires the complete document object with all system fields.");
14
14
  const ErpnextSaveDocument_SavedDocumentSchema = zod.z.object({
15
- name: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Unique identifier of the saved document.").optional()),
16
- doctype: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Document type that was saved.").optional())
15
+ name: zod.z.string().describe("Unique identifier of the saved document.").nullable().optional(),
16
+ doctype: zod.z.string().describe("Document type that was saved.").nullable().optional()
17
17
  }).passthrough().describe("Saved document with base fields. Allows additional doctype-specific fields.");
18
18
  const ErpnextSaveDocumentOutput = zod.z.object({ docs: zod.z.array(ErpnextSaveDocument_SavedDocumentSchema).describe("List containing the saved document object(s). Typically contains a single document after save operation.") }).describe("Response model containing the saved document details.\nReturns the complete document object after successful save.");
19
19
  const erpnextSaveDocument = require_action.action("ERPNEXT_SAVE_DOCUMENT", {
@@ -1 +1 @@
1
- {"version":3,"file":"save-document.cjs","names":["z","action"],"sources":["../../src/actions/save-document.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextSaveDocumentInput = z.object({\n doc: z.object({\n idx: z.number().int().describe(\"Index number for ordering child documents in a table.\").optional(),\n name: z.string().describe(\"Unique identifier of the existing document to update. Required.\"),\n owner: z.string().describe(\"Email of the user who owns/created the document.\").optional(),\n doctype: z.string().describe(\"Document type (e.g., 'ToDo', 'Customer', 'Sales Order'). Required.\"),\n creation: z.string().describe(\"Document creation timestamp in 'YYYY-MM-DD HH:MM:SS.ffffff' format.\").optional(),\n modified: z.string().describe(\"Last modified timestamp in 'YYYY-MM-DD HH:MM:SS.ffffff' format.\").optional(),\n docstatus: z.number().int().describe(\"Document status: 0=Draft, 1=Submitted, 2=Cancelled.\").optional(),\n modified_by: z.string().describe(\"Email of the user who last modified the document.\").optional(),\n}).passthrough().describe(\"Complete document object to save. Must include 'doctype' and 'name' at minimum. Should also include system fields (owner, creation, modified, modified_by, docstatus, idx) and any doctype-specific fields you want to update. Additional fields beyond the base schema are allowed and will be passed to the API.\"),\n}).describe(\"Request model for saving an existing ERPNext/Frappe document with changes.\\nRequires the complete document object with all system fields.\");\nconst ErpnextSaveDocument_SavedDocumentSchema = z.object({\n name: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Unique identifier of the saved document.\").optional()),\n doctype: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Document type that was saved.\").optional()),\n}).passthrough().describe(\"Saved document with base fields. Allows additional doctype-specific fields.\");\nexport const ErpnextSaveDocumentOutput = z.object({\n docs: z.array(ErpnextSaveDocument_SavedDocumentSchema).describe(\"List containing the saved document object(s). Typically contains a single document after save operation.\"),\n}).describe(\"Response model containing the saved document details.\\nReturns the complete document object after successful save.\");\n\nexport const erpnextSaveDocument = action(\"ERPNEXT_SAVE_DOCUMENT\", {\n slug: \"erpnext-save-document\",\n name: \"Save Document\",\n description: \"Tool to save an existing ERPNext/Frappe document with changes. Use when you need to update an existing document in the system. Requires the complete document object including all system fields and the fields being updated.\",\n input: ErpnextSaveDocumentInput,\n output: ErpnextSaveDocumentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2BA,IAAAA,EAAE,OAAO,EAC/C,KAAKA,IAAAA,EAAE,OAAO;CACd,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACjG,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;CAC3F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CACxF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CACjG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CAC9G,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC1G,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACrG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;AACjG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oTAAoT,EAC9U,CAAC,CAAC,CAAC,SAAS,2IAA2I;AACvJ,MAAM,0CAA0CA,IAAAA,EAAE,OAAO;CACvD,MAAMA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC;CAC9I,SAASA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC;AACxI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6EAA6E;AACvG,MAAa,4BAA4BA,IAAAA,EAAE,OAAO,EAChD,MAAMA,IAAAA,EAAE,MAAM,uCAAuC,CAAC,CAAC,SAAS,0GAA0G,EAC5K,CAAC,CAAC,CAAC,SAAS,oHAAoH;AAEhI,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"save-document.cjs","names":["z","action"],"sources":["../../src/actions/save-document.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextSaveDocumentInput = z.object({\n doc: z.object({\n idx: z.number().int().describe(\"Index number for ordering child documents in a table.\").optional(),\n name: z.string().describe(\"Unique identifier of the existing document to update. Required.\"),\n owner: z.string().describe(\"Email of the user who owns/created the document.\").optional(),\n doctype: z.string().describe(\"Document type (e.g., 'ToDo', 'Customer', 'Sales Order'). Required.\"),\n creation: z.string().describe(\"Document creation timestamp in 'YYYY-MM-DD HH:MM:SS.ffffff' format.\").optional(),\n modified: z.string().describe(\"Last modified timestamp in 'YYYY-MM-DD HH:MM:SS.ffffff' format.\").optional(),\n docstatus: z.number().int().describe(\"Document status: 0=Draft, 1=Submitted, 2=Cancelled.\").optional(),\n modified_by: z.string().describe(\"Email of the user who last modified the document.\").optional(),\n}).passthrough().describe(\"Complete document object to save. Must include 'doctype' and 'name' at minimum. Should also include system fields (owner, creation, modified, modified_by, docstatus, idx) and any doctype-specific fields you want to update. Additional fields beyond the base schema are allowed and will be passed to the API.\"),\n}).describe(\"Request model for saving an existing ERPNext/Frappe document with changes.\\nRequires the complete document object with all system fields.\");\nconst ErpnextSaveDocument_SavedDocumentSchema = z.object({\n name: z.string().describe(\"Unique identifier of the saved document.\").nullable().optional(),\n doctype: z.string().describe(\"Document type that was saved.\").nullable().optional(),\n}).passthrough().describe(\"Saved document with base fields. Allows additional doctype-specific fields.\");\nexport const ErpnextSaveDocumentOutput = z.object({\n docs: z.array(ErpnextSaveDocument_SavedDocumentSchema).describe(\"List containing the saved document object(s). Typically contains a single document after save operation.\"),\n}).describe(\"Response model containing the saved document details.\\nReturns the complete document object after successful save.\");\n\nexport const erpnextSaveDocument = action(\"ERPNEXT_SAVE_DOCUMENT\", {\n slug: \"erpnext-save-document\",\n name: \"Save Document\",\n description: \"Tool to save an existing ERPNext/Frappe document with changes. Use when you need to update an existing document in the system. Requires the complete document object including all system fields and the fields being updated.\",\n input: ErpnextSaveDocumentInput,\n output: ErpnextSaveDocumentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2BA,IAAAA,EAAE,OAAO,EAC/C,KAAKA,IAAAA,EAAE,OAAO;CACd,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACjG,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;CAC3F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CACxF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CACjG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CAC9G,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC1G,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACrG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;AACjG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oTAAoT,EAC9U,CAAC,CAAC,CAAC,SAAS,2IAA2I;AACvJ,MAAM,0CAA0CA,IAAAA,EAAE,OAAO;CACvD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6EAA6E;AACvG,MAAa,4BAA4BA,IAAAA,EAAE,OAAO,EAChD,MAAMA,IAAAA,EAAE,MAAM,uCAAuC,CAAC,CAAC,SAAS,0GAA0G,EAC5K,CAAC,CAAC,CAAC,SAAS,oHAAoH;AAEhI,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -15,8 +15,8 @@ declare const ErpnextSaveDocumentInput: z.ZodObject<{
15
15
  }, z.core.$strip>;
16
16
  declare const ErpnextSaveDocumentOutput: z.ZodObject<{
17
17
  docs: z.ZodArray<z.ZodObject<{
18
- name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
19
- doctype: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
18
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ doctype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
20
  }, z.core.$loose>>;
21
21
  }, z.core.$strip>;
22
22
  declare const erpnextSaveDocument: import("@keystrokehq/action").WorkflowActionDefinition<{
@@ -31,13 +31,7 @@ declare const erpnextSaveDocument: import("@keystrokehq/action").WorkflowActionD
31
31
  docstatus?: number | undefined;
32
32
  modified_by?: string | undefined;
33
33
  };
34
- }, {
35
- docs: {
36
- [x: string]: unknown;
37
- name?: string | undefined;
38
- doctype?: string | undefined;
39
- }[];
40
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
34
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
41
35
  //#endregion
42
36
  export { erpnextSaveDocument };
43
37
  //# sourceMappingURL=save-document.d.cts.map
@@ -15,8 +15,8 @@ declare const ErpnextSaveDocumentInput: z.ZodObject<{
15
15
  }, z.core.$strip>;
16
16
  declare const ErpnextSaveDocumentOutput: z.ZodObject<{
17
17
  docs: z.ZodArray<z.ZodObject<{
18
- name: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
19
- doctype: z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
18
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ doctype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
20
  }, z.core.$loose>>;
21
21
  }, z.core.$strip>;
22
22
  declare const erpnextSaveDocument: import("@keystrokehq/action").WorkflowActionDefinition<{
@@ -31,13 +31,7 @@ declare const erpnextSaveDocument: import("@keystrokehq/action").WorkflowActionD
31
31
  docstatus?: number | undefined;
32
32
  modified_by?: string | undefined;
33
33
  };
34
- }, {
35
- docs: {
36
- [x: string]: unknown;
37
- name?: string | undefined;
38
- doctype?: string | undefined;
39
- }[];
40
- }, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
34
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
41
35
  //#endregion
42
36
  export { erpnextSaveDocument };
43
37
  //# sourceMappingURL=save-document.d.mts.map
@@ -12,8 +12,8 @@ const ErpnextSaveDocumentInput = z.object({ doc: z.object({
12
12
  modified_by: z.string().describe("Email of the user who last modified the document.").optional()
13
13
  }).passthrough().describe("Complete document object to save. Must include 'doctype' and 'name' at minimum. Should also include system fields (owner, creation, modified, modified_by, docstatus, idx) and any doctype-specific fields you want to update. Additional fields beyond the base schema are allowed and will be passed to the API.") }).describe("Request model for saving an existing ERPNext/Frappe document with changes.\nRequires the complete document object with all system fields.");
14
14
  const ErpnextSaveDocument_SavedDocumentSchema = z.object({
15
- name: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Unique identifier of the saved document.").optional()),
16
- doctype: z.preprocess((value) => value === null ? void 0 : value, z.string().describe("Document type that was saved.").optional())
15
+ name: z.string().describe("Unique identifier of the saved document.").nullable().optional(),
16
+ doctype: z.string().describe("Document type that was saved.").nullable().optional()
17
17
  }).passthrough().describe("Saved document with base fields. Allows additional doctype-specific fields.");
18
18
  const erpnextSaveDocument = action("ERPNEXT_SAVE_DOCUMENT", {
19
19
  slug: "erpnext-save-document",
@@ -1 +1 @@
1
- {"version":3,"file":"save-document.mjs","names":[],"sources":["../../src/actions/save-document.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextSaveDocumentInput = z.object({\n doc: z.object({\n idx: z.number().int().describe(\"Index number for ordering child documents in a table.\").optional(),\n name: z.string().describe(\"Unique identifier of the existing document to update. Required.\"),\n owner: z.string().describe(\"Email of the user who owns/created the document.\").optional(),\n doctype: z.string().describe(\"Document type (e.g., 'ToDo', 'Customer', 'Sales Order'). Required.\"),\n creation: z.string().describe(\"Document creation timestamp in 'YYYY-MM-DD HH:MM:SS.ffffff' format.\").optional(),\n modified: z.string().describe(\"Last modified timestamp in 'YYYY-MM-DD HH:MM:SS.ffffff' format.\").optional(),\n docstatus: z.number().int().describe(\"Document status: 0=Draft, 1=Submitted, 2=Cancelled.\").optional(),\n modified_by: z.string().describe(\"Email of the user who last modified the document.\").optional(),\n}).passthrough().describe(\"Complete document object to save. Must include 'doctype' and 'name' at minimum. Should also include system fields (owner, creation, modified, modified_by, docstatus, idx) and any doctype-specific fields you want to update. Additional fields beyond the base schema are allowed and will be passed to the API.\"),\n}).describe(\"Request model for saving an existing ERPNext/Frappe document with changes.\\nRequires the complete document object with all system fields.\");\nconst ErpnextSaveDocument_SavedDocumentSchema = z.object({\n name: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Unique identifier of the saved document.\").optional()),\n doctype: z.preprocess((value) => (value === null ? undefined : value), z.string().describe(\"Document type that was saved.\").optional()),\n}).passthrough().describe(\"Saved document with base fields. Allows additional doctype-specific fields.\");\nexport const ErpnextSaveDocumentOutput = z.object({\n docs: z.array(ErpnextSaveDocument_SavedDocumentSchema).describe(\"List containing the saved document object(s). Typically contains a single document after save operation.\"),\n}).describe(\"Response model containing the saved document details.\\nReturns the complete document object after successful save.\");\n\nexport const erpnextSaveDocument = action(\"ERPNEXT_SAVE_DOCUMENT\", {\n slug: \"erpnext-save-document\",\n name: \"Save Document\",\n description: \"Tool to save an existing ERPNext/Frappe document with changes. Use when you need to update an existing document in the system. Requires the complete document object including all system fields and the fields being updated.\",\n input: ErpnextSaveDocumentInput,\n output: ErpnextSaveDocumentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2B,EAAE,OAAO,EAC/C,KAAK,EAAE,OAAO;CACd,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACjG,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;CAC3F,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CACxF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CACjG,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CAC9G,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC1G,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACrG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;AACjG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oTAAoT,EAC9U,CAAC,CAAC,CAAC,SAAS,2IAA2I;AACvJ,MAAM,0CAA0C,EAAE,OAAO;CACvD,MAAM,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC;CAC9I,SAAS,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC;AACxI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6EAA6E;AAKvG,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATuC,EAAE,OAAO,EAChD,MAAM,EAAE,MAAM,uCAAuC,CAAC,CAAC,SAAS,0GAA0G,EAC5K,CAAC,CAAC,CAAC,SAAS,oHAOF;AACV,CAAC"}
1
+ {"version":3,"file":"save-document.mjs","names":[],"sources":["../../src/actions/save-document.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ErpnextSaveDocumentInput = z.object({\n doc: z.object({\n idx: z.number().int().describe(\"Index number for ordering child documents in a table.\").optional(),\n name: z.string().describe(\"Unique identifier of the existing document to update. Required.\"),\n owner: z.string().describe(\"Email of the user who owns/created the document.\").optional(),\n doctype: z.string().describe(\"Document type (e.g., 'ToDo', 'Customer', 'Sales Order'). Required.\"),\n creation: z.string().describe(\"Document creation timestamp in 'YYYY-MM-DD HH:MM:SS.ffffff' format.\").optional(),\n modified: z.string().describe(\"Last modified timestamp in 'YYYY-MM-DD HH:MM:SS.ffffff' format.\").optional(),\n docstatus: z.number().int().describe(\"Document status: 0=Draft, 1=Submitted, 2=Cancelled.\").optional(),\n modified_by: z.string().describe(\"Email of the user who last modified the document.\").optional(),\n}).passthrough().describe(\"Complete document object to save. Must include 'doctype' and 'name' at minimum. Should also include system fields (owner, creation, modified, modified_by, docstatus, idx) and any doctype-specific fields you want to update. Additional fields beyond the base schema are allowed and will be passed to the API.\"),\n}).describe(\"Request model for saving an existing ERPNext/Frappe document with changes.\\nRequires the complete document object with all system fields.\");\nconst ErpnextSaveDocument_SavedDocumentSchema = z.object({\n name: z.string().describe(\"Unique identifier of the saved document.\").nullable().optional(),\n doctype: z.string().describe(\"Document type that was saved.\").nullable().optional(),\n}).passthrough().describe(\"Saved document with base fields. Allows additional doctype-specific fields.\");\nexport const ErpnextSaveDocumentOutput = z.object({\n docs: z.array(ErpnextSaveDocument_SavedDocumentSchema).describe(\"List containing the saved document object(s). Typically contains a single document after save operation.\"),\n}).describe(\"Response model containing the saved document details.\\nReturns the complete document object after successful save.\");\n\nexport const erpnextSaveDocument = action(\"ERPNEXT_SAVE_DOCUMENT\", {\n slug: \"erpnext-save-document\",\n name: \"Save Document\",\n description: \"Tool to save an existing ERPNext/Frappe document with changes. Use when you need to update an existing document in the system. Requires the complete document object including all system fields and the fields being updated.\",\n input: ErpnextSaveDocumentInput,\n output: ErpnextSaveDocumentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2B,EAAE,OAAO,EAC/C,KAAK,EAAE,OAAO;CACd,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACjG,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;CAC3F,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CACxF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CACjG,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CAC9G,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC1G,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CACrG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;AACjG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oTAAoT,EAC9U,CAAC,CAAC,CAAC,SAAS,2IAA2I;AACvJ,MAAM,0CAA0C,EAAE,OAAO;CACvD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6EAA6E;AAKvG,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATuC,EAAE,OAAO,EAChD,MAAM,EAAE,MAAM,uCAAuC,CAAC,CAAC,SAAS,0GAA0G,EAC5K,CAAC,CAAC,CAAC,SAAS,oHAOF;AACV,CAAC"}
@@ -8,14 +8,14 @@ const ErpnextSearchGlobalInput = zod.z.object({
8
8
  start: zod.z.number().int().describe("Starting position for pagination (0-based index)").optional()
9
9
  }).describe("Request model for performing global search across ERPNext documents.");
10
10
  const ErpnextSearchGlobal_SearchResultSchema = zod.z.object({
11
- name: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Document or page identifier").optional()),
12
- route: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("URL path for accessing the resource").optional()),
13
- title: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Page or document title").optional()),
14
- content: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Searchable text content from the document").optional()),
15
- doctype: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Document type identifier").optional()),
16
- relevance: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.number().int().describe("Relevance score based on title word matches").optional())
11
+ name: zod.z.string().describe("Document or page identifier").nullable().optional(),
12
+ route: zod.z.string().describe("URL path for accessing the resource").nullable().optional(),
13
+ title: zod.z.string().describe("Page or document title").nullable().optional(),
14
+ content: zod.z.string().describe("Searchable text content from the document").nullable().optional(),
15
+ doctype: zod.z.string().describe("Document type identifier").nullable().optional(),
16
+ relevance: zod.z.number().int().describe("Relevance score based on title word matches").nullable().optional()
17
17
  }).describe("Individual search result item.");
18
- const ErpnextSearchGlobalOutput = zod.z.object({ message: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.array(ErpnextSearchGlobal_SearchResultSchema).describe("List of search results matching the query, sorted by relevance").optional()) }).describe("Response model containing global search results.");
18
+ const ErpnextSearchGlobalOutput = zod.z.object({ message: zod.z.array(ErpnextSearchGlobal_SearchResultSchema).describe("List of search results matching the query, sorted by relevance").nullable().optional() }).describe("Response model containing global search results.");
19
19
  const erpnextSearchGlobal = require_action.action("ERPNEXT_SEARCH_GLOBAL", {
20
20
  slug: "erpnext-search-global",
21
21
  name: "Global Search",