@human2human/sdk 0.2.0 → 0.4.0

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 (406) hide show
  1. package/README.md +84 -22
  2. package/dist/client.d.ts +15 -3
  3. package/dist/client.js +17 -6
  4. package/dist/environment.d.ts +1 -1
  5. package/dist/environment.js +1 -1
  6. package/dist/index.d.ts +6 -0
  7. package/dist/index.js +6 -0
  8. package/dist/resources/agent/build/index.d.ts +6 -0
  9. package/dist/resources/agent/build/index.js +6 -0
  10. package/dist/resources/agent/build/resource-client.d.ts +6 -0
  11. package/dist/resources/agent/build/resource-client.js +6 -0
  12. package/dist/resources/agent/build/workflow/index.d.ts +6 -0
  13. package/dist/resources/agent/build/workflow/index.js +6 -0
  14. package/dist/resources/agent/build/workflow/resource-client.d.ts +11 -1
  15. package/dist/resources/agent/build/workflow/resource-client.js +11 -1
  16. package/dist/resources/agent/history/index.d.ts +5 -0
  17. package/dist/resources/agent/history/index.js +8 -0
  18. package/dist/resources/agent/history/request-types.d.ts +30 -0
  19. package/dist/resources/agent/history/request-types.js +74 -0
  20. package/dist/resources/agent/history/resource-client.d.ts +17 -0
  21. package/dist/resources/agent/history/resource-client.js +78 -0
  22. package/dist/resources/agent/index.d.ts +8 -0
  23. package/dist/resources/agent/index.js +8 -1
  24. package/dist/resources/agent/request-types.d.ts +68 -0
  25. package/dist/resources/agent/request-types.js +117 -0
  26. package/dist/resources/agent/resource-client.d.ts +28 -1
  27. package/dist/resources/agent/resource-client.js +90 -0
  28. package/dist/resources/auth/index.d.ts +6 -0
  29. package/dist/resources/auth/index.js +6 -0
  30. package/dist/resources/auth/login/index.d.ts +6 -0
  31. package/dist/resources/auth/login/index.js +6 -0
  32. package/dist/resources/auth/login/resource-client.d.ts +9 -1
  33. package/dist/resources/auth/login/resource-client.js +9 -1
  34. package/dist/resources/auth/refresh/index.d.ts +6 -0
  35. package/dist/resources/auth/refresh/index.js +6 -0
  36. package/dist/resources/auth/refresh/resource-client.d.ts +9 -1
  37. package/dist/resources/auth/refresh/resource-client.js +9 -1
  38. package/dist/resources/auth/resource-client.d.ts +6 -0
  39. package/dist/resources/auth/resource-client.js +6 -0
  40. package/dist/resources/chats/index.d.ts +7 -1
  41. package/dist/resources/chats/index.js +6 -0
  42. package/dist/resources/chats/request-types.d.ts +0 -44
  43. package/dist/resources/chats/request-types.js +1 -73
  44. package/dist/resources/chats/resource-client.d.ts +7 -17
  45. package/dist/resources/chats/resource-client.js +7 -87
  46. package/dist/resources/feeds/index.d.ts +6 -1
  47. package/dist/resources/feeds/index.js +7 -2
  48. package/dist/resources/feeds/items/index.d.ts +6 -0
  49. package/dist/resources/feeds/items/index.js +6 -0
  50. package/dist/resources/feeds/items/resource-client.d.ts +10 -0
  51. package/dist/resources/feeds/items/resource-client.js +10 -0
  52. package/dist/resources/feeds/resource-client.d.ts +12 -3
  53. package/dist/resources/feeds/resource-client.js +12 -5
  54. package/dist/resources/feeds/vector/index.d.ts +3 -0
  55. package/dist/resources/feeds/vector/index.js +3 -0
  56. package/dist/resources/feeds/vector/resource-client.d.ts +3 -0
  57. package/dist/resources/feeds/vector/resource-client.js +3 -0
  58. package/dist/resources/feeds/vector/search/index.d.ts +3 -0
  59. package/dist/resources/feeds/vector/search/index.js +3 -0
  60. package/dist/resources/feeds/vector/search/resource-client.d.ts +5 -0
  61. package/dist/resources/feeds/vector/search/resource-client.js +5 -0
  62. package/dist/resources/index.d.ts +3 -1
  63. package/dist/resources/index.js +4 -2
  64. package/dist/resources/integrations/api/index.d.ts +6 -0
  65. package/dist/resources/integrations/api/index.js +6 -0
  66. package/dist/resources/integrations/api/operations/index.d.ts +6 -0
  67. package/dist/resources/integrations/api/operations/index.js +6 -0
  68. package/dist/resources/integrations/api/operations/resource-client.d.ts +14 -0
  69. package/dist/resources/integrations/api/operations/resource-client.js +14 -0
  70. package/dist/resources/integrations/api/resource-client.d.ts +12 -0
  71. package/dist/resources/integrations/api/resource-client.js +12 -0
  72. package/dist/resources/integrations/api/secrets/index.d.ts +6 -0
  73. package/dist/resources/integrations/api/secrets/index.js +6 -0
  74. package/dist/resources/integrations/api/secrets/resource-client.d.ts +12 -0
  75. package/dist/resources/integrations/api/secrets/resource-client.js +12 -0
  76. package/dist/resources/integrations/index.d.ts +6 -0
  77. package/dist/resources/integrations/index.js +6 -0
  78. package/dist/resources/integrations/resource-client.d.ts +6 -0
  79. package/dist/resources/integrations/resource-client.js +6 -0
  80. package/dist/resources/memory/index.d.ts +8 -0
  81. package/dist/resources/memory/index.js +45 -0
  82. package/dist/resources/memory/resource-client.d.ts +13 -0
  83. package/dist/resources/memory/resource-client.js +23 -0
  84. package/dist/resources/memory/tables/index.d.ts +10 -0
  85. package/dist/resources/memory/tables/index.js +46 -0
  86. package/dist/resources/memory/tables/mutate/index.d.ts +8 -0
  87. package/dist/resources/memory/tables/mutate/index.js +11 -0
  88. package/dist/resources/memory/tables/mutate/request-types.d.ts +33 -0
  89. package/dist/resources/memory/tables/mutate/request-types.js +77 -0
  90. package/dist/resources/memory/tables/mutate/resource-client.d.ts +20 -0
  91. package/dist/resources/memory/tables/mutate/resource-client.js +36 -0
  92. package/dist/resources/memory/tables/query/index.d.ts +8 -0
  93. package/dist/resources/memory/tables/query/index.js +11 -0
  94. package/dist/resources/memory/tables/query/request-types.d.ts +37 -0
  95. package/dist/resources/memory/tables/query/request-types.js +80 -0
  96. package/dist/resources/memory/tables/query/resource-client.d.ts +20 -0
  97. package/dist/resources/memory/tables/query/resource-client.js +36 -0
  98. package/dist/resources/memory/tables/request-types.d.ts +105 -0
  99. package/dist/resources/memory/tables/request-types.js +171 -0
  100. package/dist/resources/memory/tables/resource-client.d.ts +50 -0
  101. package/dist/resources/memory/tables/resource-client.js +147 -0
  102. package/dist/resources/search-groups/index.d.ts +6 -0
  103. package/dist/resources/search-groups/index.js +6 -0
  104. package/dist/resources/search-groups/items/index.d.ts +6 -0
  105. package/dist/resources/search-groups/items/index.js +6 -0
  106. package/dist/resources/search-groups/items/resource-client.d.ts +12 -0
  107. package/dist/resources/search-groups/items/resource-client.js +12 -0
  108. package/dist/resources/search-groups/resource-client.d.ts +12 -0
  109. package/dist/resources/search-groups/resource-client.js +12 -0
  110. package/dist/resources/subscriptions/events/index.d.ts +8 -0
  111. package/dist/resources/subscriptions/events/index.js +11 -0
  112. package/dist/resources/subscriptions/events/request-types.d.ts +115 -0
  113. package/dist/resources/subscriptions/events/request-types.js +179 -0
  114. package/dist/resources/subscriptions/events/resource-client.d.ts +44 -0
  115. package/dist/resources/subscriptions/events/resource-client.js +135 -0
  116. package/dist/resources/subscriptions/index.d.ts +8 -0
  117. package/dist/resources/subscriptions/index.js +45 -0
  118. package/dist/resources/subscriptions/resource-client.d.ts +13 -0
  119. package/dist/resources/subscriptions/resource-client.js +23 -0
  120. package/dist/resources/tools/code-execution/index.d.ts +6 -0
  121. package/dist/resources/tools/code-execution/index.js +6 -0
  122. package/dist/resources/tools/code-execution/request-types.d.ts +7 -2
  123. package/dist/resources/tools/code-execution/request-types.js +4 -0
  124. package/dist/resources/tools/code-execution/resource-client.d.ts +9 -1
  125. package/dist/resources/tools/code-execution/resource-client.js +9 -1
  126. package/dist/resources/tools/dictionary-search/index.d.ts +6 -0
  127. package/dist/resources/tools/dictionary-search/index.js +6 -0
  128. package/dist/resources/tools/dictionary-search/resource-client.d.ts +9 -1
  129. package/dist/resources/tools/dictionary-search/resource-client.js +9 -1
  130. package/dist/resources/tools/format/index.d.ts +6 -0
  131. package/dist/resources/tools/format/index.js +6 -0
  132. package/dist/resources/tools/format/request-types.d.ts +5 -2
  133. package/dist/resources/tools/format/request-types.js +5 -0
  134. package/dist/resources/tools/format/resource-client.d.ts +9 -1
  135. package/dist/resources/tools/format/resource-client.js +9 -1
  136. package/dist/resources/tools/index.d.ts +6 -0
  137. package/dist/resources/tools/index.js +6 -0
  138. package/dist/resources/tools/internet-search/index.d.ts +6 -0
  139. package/dist/resources/tools/internet-search/index.js +6 -0
  140. package/dist/resources/tools/internet-search/request-types.d.ts +30 -0
  141. package/dist/resources/tools/internet-search/request-types.js +24 -0
  142. package/dist/resources/tools/internet-search/resource-client.d.ts +9 -1
  143. package/dist/resources/tools/internet-search/resource-client.js +9 -1
  144. package/dist/resources/tools/memory-query/index.d.ts +6 -0
  145. package/dist/resources/tools/memory-query/index.js +6 -0
  146. package/dist/resources/tools/memory-query/resource-client.d.ts +9 -1
  147. package/dist/resources/tools/memory-query/resource-client.js +9 -1
  148. package/dist/resources/tools/meta-tagger/index.d.ts +6 -0
  149. package/dist/resources/tools/meta-tagger/index.js +6 -0
  150. package/dist/resources/tools/meta-tagger/resource-client.d.ts +9 -1
  151. package/dist/resources/tools/meta-tagger/resource-client.js +9 -1
  152. package/dist/resources/tools/resource-client.d.ts +9 -1
  153. package/dist/resources/tools/resource-client.js +9 -1
  154. package/dist/resources/tools/standard-llm/index.d.ts +6 -0
  155. package/dist/resources/tools/standard-llm/index.js +6 -0
  156. package/dist/resources/tools/standard-llm/request-types.d.ts +32 -2
  157. package/dist/resources/tools/standard-llm/request-types.js +24 -0
  158. package/dist/resources/tools/standard-llm/resource-client.d.ts +9 -1
  159. package/dist/resources/tools/standard-llm/resource-client.js +9 -1
  160. package/dist/resources/tools/structured-output/index.d.ts +6 -0
  161. package/dist/resources/tools/structured-output/index.js +6 -0
  162. package/dist/resources/tools/structured-output/request-types.d.ts +3 -0
  163. package/dist/resources/tools/structured-output/request-types.js +5 -0
  164. package/dist/resources/tools/structured-output/resource-client.d.ts +9 -1
  165. package/dist/resources/tools/structured-output/resource-client.js +9 -1
  166. package/dist/resources/workflows/dispatch/index.d.ts +6 -0
  167. package/dist/resources/workflows/dispatch/index.js +6 -0
  168. package/dist/resources/workflows/dispatch/resource-client.d.ts +9 -1
  169. package/dist/resources/workflows/dispatch/resource-client.js +9 -1
  170. package/dist/resources/workflows/index.d.ts +9 -0
  171. package/dist/resources/workflows/index.js +9 -1
  172. package/dist/resources/workflows/invoke/index.d.ts +6 -0
  173. package/dist/resources/workflows/invoke/index.js +6 -0
  174. package/dist/resources/workflows/invoke/resource-client.d.ts +9 -1
  175. package/dist/resources/workflows/invoke/resource-client.js +9 -1
  176. package/dist/resources/workflows/request-types.d.ts +143 -0
  177. package/dist/resources/workflows/request-types.js +214 -0
  178. package/dist/resources/workflows/resource-client.d.ts +55 -1
  179. package/dist/resources/workflows/resource-client.js +155 -0
  180. package/dist/resources/workflows/runs/dispatch/index.d.ts +8 -0
  181. package/dist/resources/workflows/runs/dispatch/index.js +11 -0
  182. package/dist/resources/workflows/runs/dispatch/request-types.d.ts +25 -0
  183. package/dist/resources/workflows/runs/dispatch/request-types.js +70 -0
  184. package/dist/resources/workflows/runs/dispatch/resource-client.d.ts +20 -0
  185. package/dist/resources/workflows/runs/dispatch/resource-client.js +33 -0
  186. package/dist/resources/workflows/runs/index.d.ts +9 -0
  187. package/dist/resources/workflows/runs/index.js +45 -0
  188. package/dist/resources/workflows/runs/request-types.d.ts +115 -0
  189. package/dist/resources/workflows/runs/request-types.js +179 -0
  190. package/dist/resources/workflows/runs/resource-client.d.ts +47 -0
  191. package/dist/resources/workflows/runs/resource-client.js +154 -0
  192. package/dist/resources/workflows/versions/index.d.ts +9 -0
  193. package/dist/resources/workflows/versions/index.js +45 -0
  194. package/dist/resources/workflows/versions/request-types.d.ts +174 -0
  195. package/dist/resources/workflows/versions/request-types.js +239 -0
  196. package/dist/resources/workflows/versions/resource-client.d.ts +55 -0
  197. package/dist/resources/workflows/versions/resource-client.js +162 -0
  198. package/dist/resources/workflows/versions/tasks/index.d.ts +5 -0
  199. package/dist/resources/workflows/versions/tasks/index.js +8 -0
  200. package/dist/resources/workflows/versions/tasks/request-types.d.ts +177 -0
  201. package/dist/resources/workflows/versions/tasks/request-types.js +241 -0
  202. package/dist/resources/workflows/versions/tasks/resource-client.d.ts +41 -0
  203. package/dist/resources/workflows/versions/tasks/resource-client.js +87 -0
  204. package/dist/resources/workspace/index.d.ts +5 -0
  205. package/dist/resources/workspace/index.js +42 -0
  206. package/dist/resources/workspace/resource-client.d.ts +10 -0
  207. package/dist/resources/workspace/resource-client.js +20 -0
  208. package/dist/resources/workspace/variables/index.d.ts +5 -0
  209. package/dist/resources/workspace/variables/index.js +8 -0
  210. package/dist/resources/workspace/variables/request-types.d.ts +96 -0
  211. package/dist/resources/workspace/variables/request-types.js +176 -0
  212. package/dist/resources/workspace/variables/resource-client.d.ts +41 -0
  213. package/dist/resources/workspace/variables/resource-client.js +162 -0
  214. package/dist/types/agent-create-body.d.ts +47 -0
  215. package/dist/types/agent-create-body.js +88 -0
  216. package/dist/types/agent-create-response-messages-item-role-enum.d.ts +7 -0
  217. package/dist/types/agent-create-response-messages-item-role-enum.js +5 -0
  218. package/dist/types/agent-create-response-messages-item.d.ts +24 -0
  219. package/dist/types/agent-create-response-messages-item.js +74 -0
  220. package/dist/types/agent-create-response.d.ts +41 -0
  221. package/dist/types/agent-create-response.js +83 -0
  222. package/dist/types/agent-history-list-response-chats-item.d.ts +30 -0
  223. package/dist/types/agent-history-list-response-chats-item.js +86 -0
  224. package/dist/types/agent-history-list-response.d.ts +23 -0
  225. package/dist/types/agent-history-list-response.js +71 -0
  226. package/dist/types/agent-list-response-messages-item-role-enum.d.ts +7 -0
  227. package/dist/types/agent-list-response-messages-item-role-enum.js +5 -0
  228. package/dist/types/agent-list-response-messages-item.d.ts +24 -0
  229. package/dist/types/agent-list-response-messages-item.js +74 -0
  230. package/dist/types/agent-list-response.d.ts +31 -0
  231. package/dist/types/agent-list-response.js +75 -0
  232. package/dist/types/feeds-create-body.d.ts +2 -6
  233. package/dist/types/feeds-create-body.js +4 -16
  234. package/dist/types/index.d.ts +92 -18
  235. package/dist/types/index.js +6 -0
  236. package/dist/types/memory-tables-create-body.d.ts +37 -0
  237. package/dist/types/memory-tables-create-body.js +80 -0
  238. package/dist/types/memory-tables-create-response.d.ts +37 -0
  239. package/dist/types/memory-tables-create-response.js +92 -0
  240. package/dist/types/memory-tables-delete-response.d.ts +37 -0
  241. package/dist/types/memory-tables-delete-response.js +92 -0
  242. package/dist/types/memory-tables-get-response.d.ts +37 -0
  243. package/dist/types/memory-tables-get-response.js +92 -0
  244. package/dist/types/memory-tables-list-response-item.d.ts +37 -0
  245. package/dist/types/memory-tables-list-response-item.js +92 -0
  246. package/dist/types/memory-tables-mutate-create-body-mutation-type-enum.d.ts +7 -0
  247. package/dist/types/memory-tables-mutate-create-body-mutation-type-enum.js +5 -0
  248. package/dist/types/memory-tables-mutate-create-body-mutation.d.ts +37 -0
  249. package/dist/types/memory-tables-mutate-create-body-mutation.js +80 -0
  250. package/dist/types/memory-tables-mutate-create-body.d.ts +33 -0
  251. package/dist/types/memory-tables-mutate-create-body.js +77 -0
  252. package/dist/types/memory-tables-mutate-create-response-data-item.d.ts +29 -0
  253. package/dist/types/memory-tables-mutate-create-response-data-item.js +76 -0
  254. package/dist/types/memory-tables-mutate-create-response-errors-item.d.ts +24 -0
  255. package/dist/types/memory-tables-mutate-create-response-errors-item.js +74 -0
  256. package/dist/types/memory-tables-mutate-create-response.d.ts +39 -0
  257. package/dist/types/memory-tables-mutate-create-response.js +90 -0
  258. package/dist/types/memory-tables-query-create-body.d.ts +37 -0
  259. package/dist/types/memory-tables-query-create-body.js +80 -0
  260. package/dist/types/memory-tables-query-create-response-row.d.ts +29 -0
  261. package/dist/types/memory-tables-query-create-response-row.js +76 -0
  262. package/dist/types/memory-tables-query-create-response-rows-item.d.ts +29 -0
  263. package/dist/types/memory-tables-query-create-response-rows-item.js +76 -0
  264. package/dist/types/memory-tables-query-create-response.d.ts +36 -0
  265. package/dist/types/memory-tables-query-create-response.js +86 -0
  266. package/dist/types/subscriptions-events-create-body-consumer-type-enum.d.ts +7 -0
  267. package/dist/types/subscriptions-events-create-body-consumer-type-enum.js +5 -0
  268. package/dist/types/subscriptions-events-create-body-producer-type-enum.d.ts +7 -0
  269. package/dist/types/subscriptions-events-create-body-producer-type-enum.js +5 -0
  270. package/dist/types/subscriptions-events-create-body.d.ts +47 -0
  271. package/dist/types/subscriptions-events-create-body.js +88 -0
  272. package/dist/types/subscriptions-events-create-response-consumer-type-enum.d.ts +7 -0
  273. package/dist/types/subscriptions-events-create-response-consumer-type-enum.js +5 -0
  274. package/dist/types/subscriptions-events-create-response-producer-type-enum.d.ts +7 -0
  275. package/dist/types/subscriptions-events-create-response-producer-type-enum.js +5 -0
  276. package/dist/types/subscriptions-events-create-response.d.ts +51 -0
  277. package/dist/types/subscriptions-events-create-response.js +96 -0
  278. package/dist/types/subscriptions-events-delete-response-consumer-type-enum.d.ts +7 -0
  279. package/dist/types/subscriptions-events-delete-response-consumer-type-enum.js +5 -0
  280. package/dist/types/subscriptions-events-delete-response-producer-type-enum.d.ts +7 -0
  281. package/dist/types/subscriptions-events-delete-response-producer-type-enum.js +5 -0
  282. package/dist/types/subscriptions-events-delete-response.d.ts +51 -0
  283. package/dist/types/subscriptions-events-delete-response.js +96 -0
  284. package/dist/types/subscriptions-events-get-response-consumer-type-enum.d.ts +7 -0
  285. package/dist/types/subscriptions-events-get-response-consumer-type-enum.js +5 -0
  286. package/dist/types/subscriptions-events-get-response-producer-type-enum.d.ts +7 -0
  287. package/dist/types/subscriptions-events-get-response-producer-type-enum.js +5 -0
  288. package/dist/types/subscriptions-events-get-response.d.ts +51 -0
  289. package/dist/types/subscriptions-events-get-response.js +96 -0
  290. package/dist/types/subscriptions-events-list-response-item-consumer-type-enum.d.ts +7 -0
  291. package/dist/types/subscriptions-events-list-response-item-consumer-type-enum.js +5 -0
  292. package/dist/types/subscriptions-events-list-response-item-producer-type-enum.d.ts +7 -0
  293. package/dist/types/subscriptions-events-list-response-item-producer-type-enum.js +5 -0
  294. package/dist/types/subscriptions-events-list-response-item.d.ts +51 -0
  295. package/dist/types/subscriptions-events-list-response-item.js +96 -0
  296. package/dist/types/tools-code-execution-create-body.d.ts +7 -2
  297. package/dist/types/tools-code-execution-create-body.js +4 -0
  298. package/dist/types/tools-format-create-body-params.d.ts +52 -0
  299. package/dist/types/tools-format-create-body-params.js +92 -0
  300. package/dist/types/tools-format-create-body.d.ts +5 -2
  301. package/dist/types/tools-format-create-body.js +5 -0
  302. package/dist/types/tools-internet-search-create-body-messages-item.d.ts +4 -4
  303. package/dist/types/tools-internet-search-create-body-messages-item.js +4 -4
  304. package/dist/types/tools-internet-search-create-body.d.ts +30 -0
  305. package/dist/types/tools-internet-search-create-body.js +24 -0
  306. package/dist/types/tools-standard-llm-create-body-messages-item.d.ts +4 -4
  307. package/dist/types/tools-standard-llm-create-body-messages-item.js +4 -4
  308. package/dist/types/tools-standard-llm-create-body.d.ts +32 -2
  309. package/dist/types/tools-standard-llm-create-body.js +24 -0
  310. package/dist/types/tools-structured-output-create-body-params.d.ts +52 -0
  311. package/dist/types/tools-structured-output-create-body-params.js +92 -0
  312. package/dist/types/tools-structured-output-create-body.d.ts +3 -0
  313. package/dist/types/tools-structured-output-create-body.js +5 -0
  314. package/dist/types/workflows-create-body.d.ts +37 -0
  315. package/dist/types/workflows-create-body.js +80 -0
  316. package/dist/types/workflows-create-response-versions-item.d.ts +67 -0
  317. package/dist/types/workflows-create-response-versions-item.js +104 -0
  318. package/dist/types/workflows-create-response.d.ts +63 -0
  319. package/dist/types/workflows-create-response.js +107 -0
  320. package/dist/types/workflows-delete-response.d.ts +62 -0
  321. package/dist/types/workflows-delete-response.js +100 -0
  322. package/dist/types/workflows-dispatch-create-body.d.ts +2 -2
  323. package/dist/types/workflows-dispatch-create-body.js +4 -4
  324. package/dist/types/workflows-get-response.d.ts +62 -0
  325. package/dist/types/workflows-get-response.js +100 -0
  326. package/dist/types/workflows-list-response-item.d.ts +62 -0
  327. package/dist/types/workflows-list-response-item.js +100 -0
  328. package/dist/types/workflows-patch-body.d.ts +37 -0
  329. package/dist/types/workflows-patch-body.js +80 -0
  330. package/dist/types/workflows-patch-response.d.ts +62 -0
  331. package/dist/types/workflows-patch-response.js +100 -0
  332. package/dist/types/workflows-runs-create-body-execution-type-enum.d.ts +7 -0
  333. package/dist/types/workflows-runs-create-body-execution-type-enum.js +5 -0
  334. package/dist/types/workflows-runs-create-body.d.ts +37 -0
  335. package/dist/types/workflows-runs-create-body.js +80 -0
  336. package/dist/types/workflows-runs-create-response-status-enum.d.ts +7 -0
  337. package/dist/types/workflows-runs-create-response-status-enum.js +5 -0
  338. package/dist/types/workflows-runs-create-response.d.ts +28 -0
  339. package/dist/types/workflows-runs-create-response.js +86 -0
  340. package/dist/types/workflows-runs-delete-response-status-enum.d.ts +7 -0
  341. package/dist/types/workflows-runs-delete-response-status-enum.js +5 -0
  342. package/dist/types/workflows-runs-delete-response.d.ts +28 -0
  343. package/dist/types/workflows-runs-delete-response.js +86 -0
  344. package/dist/types/workflows-runs-dispatch-create-response.d.ts +30 -0
  345. package/dist/types/workflows-runs-dispatch-create-response.js +74 -0
  346. package/dist/types/workflows-runs-get-response-status-enum.d.ts +7 -0
  347. package/dist/types/workflows-runs-get-response-status-enum.js +5 -0
  348. package/dist/types/workflows-runs-get-response.d.ts +28 -0
  349. package/dist/types/workflows-runs-get-response.js +86 -0
  350. package/dist/types/workflows-runs-list-response-item-status-enum.d.ts +7 -0
  351. package/dist/types/workflows-runs-list-response-item-status-enum.js +5 -0
  352. package/dist/types/workflows-runs-list-response-item.d.ts +28 -0
  353. package/dist/types/workflows-runs-list-response-item.js +86 -0
  354. package/dist/types/workflows-versions-create-body-tasks-item.d.ts +72 -0
  355. package/dist/types/workflows-versions-create-body-tasks-item.js +126 -0
  356. package/dist/types/workflows-versions-create-body.d.ts +43 -0
  357. package/dist/types/workflows-versions-create-body.js +85 -0
  358. package/dist/types/workflows-versions-create-response.d.ts +67 -0
  359. package/dist/types/workflows-versions-create-response.js +104 -0
  360. package/dist/types/workflows-versions-delete-response.d.ts +67 -0
  361. package/dist/types/workflows-versions-delete-response.js +104 -0
  362. package/dist/types/workflows-versions-get-response-origin.d.ts +62 -0
  363. package/dist/types/workflows-versions-get-response-origin.js +100 -0
  364. package/dist/types/workflows-versions-get-response-tasks-item-tool.d.ts +26 -0
  365. package/dist/types/workflows-versions-get-response-tasks-item-tool.js +78 -0
  366. package/dist/types/workflows-versions-get-response-tasks-item.d.ts +73 -0
  367. package/dist/types/workflows-versions-get-response-tasks-item.js +129 -0
  368. package/dist/types/workflows-versions-get-response.d.ts +74 -0
  369. package/dist/types/workflows-versions-get-response.js +114 -0
  370. package/dist/types/workflows-versions-list-response-item.d.ts +67 -0
  371. package/dist/types/workflows-versions-list-response-item.js +104 -0
  372. package/dist/types/workflows-versions-patch-body.d.ts +37 -0
  373. package/dist/types/workflows-versions-patch-body.js +80 -0
  374. package/dist/types/workflows-versions-patch-response.d.ts +67 -0
  375. package/dist/types/workflows-versions-patch-response.js +104 -0
  376. package/dist/types/workflows-versions-tasks-create-body.d.ts +52 -0
  377. package/dist/types/workflows-versions-tasks-create-body.js +92 -0
  378. package/dist/types/workflows-versions-tasks-create-response.d.ts +72 -0
  379. package/dist/types/workflows-versions-tasks-create-response.js +126 -0
  380. package/dist/types/workflows-versions-tasks-delete-response.d.ts +72 -0
  381. package/dist/types/workflows-versions-tasks-delete-response.js +126 -0
  382. package/dist/types/workflows-versions-tasks-get-response-tool.d.ts +26 -0
  383. package/dist/types/workflows-versions-tasks-get-response-tool.js +78 -0
  384. package/dist/types/workflows-versions-tasks-get-response.d.ts +73 -0
  385. package/dist/types/workflows-versions-tasks-get-response.js +129 -0
  386. package/dist/types/workflows-versions-tasks-patch-body-type-enum.d.ts +7 -0
  387. package/dist/types/workflows-versions-tasks-patch-body-type-enum.js +5 -0
  388. package/dist/types/workflows-versions-tasks-patch-body.d.ts +62 -0
  389. package/dist/types/workflows-versions-tasks-patch-body.js +112 -0
  390. package/dist/types/workflows-versions-tasks-patch-response.d.ts +72 -0
  391. package/dist/types/workflows-versions-tasks-patch-response.js +126 -0
  392. package/dist/types/workspace-variables-create-body.d.ts +32 -0
  393. package/dist/types/workspace-variables-create-body.js +90 -0
  394. package/dist/types/workspace-variables-create-response.d.ts +38 -0
  395. package/dist/types/workspace-variables-create-response.js +102 -0
  396. package/dist/types/workspace-variables-delete-body.d.ts +22 -0
  397. package/dist/types/workspace-variables-delete-body.js +70 -0
  398. package/dist/types/workspace-variables-delete-response.d.ts +26 -0
  399. package/dist/types/workspace-variables-delete-response.js +78 -0
  400. package/dist/types/workspace-variables-list-response-item.d.ts +38 -0
  401. package/dist/types/workspace-variables-list-response-item.js +102 -0
  402. package/dist/types/workspace-variables-patch-body.d.ts +34 -0
  403. package/dist/types/workspace-variables-patch-body.js +94 -0
  404. package/dist/types/workspace-variables-patch-response.d.ts +38 -0
  405. package/dist/types/workspace-variables-patch-response.js +102 -0
  406. package/package.json +2 -2
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Generated by Sideko (sideko.dev)
3
+ **/
4
+ import * as z from "zod";
5
+ /**
6
+ * DeleteRequest
7
+ */
8
+ export type DeleteRequest = {
9
+ /**
10
+ * The workflow origin ID
11
+ */
12
+ id: string;
13
+ };
14
+ /**
15
+ * @internal
16
+ * DeleteRequest without any key transformation, this is what
17
+ * we expect to come in as network data
18
+ */
19
+ export type External$DeleteRequest = {
20
+ id: string;
21
+ };
22
+ export declare const Schemas$DeleteRequest: {
23
+ in: z.ZodType<DeleteRequest, z.ZodTypeDef, unknown>;
24
+ out: z.ZodType<External$DeleteRequest, z.ZodTypeDef, DeleteRequest>;
25
+ };
26
+ /**
27
+ * ListRequest
28
+ */
29
+ export type ListRequest = {
30
+ /**
31
+ * Number of items per page
32
+ */
33
+ limit?: number | undefined;
34
+ /**
35
+ * Page number (1-based)
36
+ */
37
+ page?: number | undefined;
38
+ };
39
+ /**
40
+ * @internal
41
+ * ListRequest without any key transformation, this is what
42
+ * we expect to come in as network data
43
+ */
44
+ export type External$ListRequest = {
45
+ limit?: number | undefined;
46
+ page?: number | undefined;
47
+ };
48
+ export declare const Schemas$ListRequest: {
49
+ in: z.ZodType<ListRequest, z.ZodTypeDef, unknown>;
50
+ out: z.ZodType<External$ListRequest, z.ZodTypeDef, ListRequest>;
51
+ };
52
+ /**
53
+ * GetRequest
54
+ */
55
+ export type GetRequest = {
56
+ /**
57
+ * The workflow origin ID
58
+ */
59
+ id: string;
60
+ };
61
+ /**
62
+ * @internal
63
+ * GetRequest without any key transformation, this is what
64
+ * we expect to come in as network data
65
+ */
66
+ export type External$GetRequest = {
67
+ id: string;
68
+ };
69
+ export declare const Schemas$GetRequest: {
70
+ in: z.ZodType<GetRequest, z.ZodTypeDef, unknown>;
71
+ out: z.ZodType<External$GetRequest, z.ZodTypeDef, GetRequest>;
72
+ };
73
+ /**
74
+ * PatchRequest
75
+ */
76
+ export type PatchRequest = {
77
+ /**
78
+ * Updated description of the workflow
79
+ */
80
+ description?: string | undefined;
81
+ /**
82
+ * Updated name of the workflow
83
+ */
84
+ name?: string | undefined;
85
+ /**
86
+ * Updated active workflow version ID
87
+ */
88
+ workflowId?: string | undefined;
89
+ /**
90
+ * The workflow origin ID
91
+ */
92
+ id: string;
93
+ [additionalProperty: string]: (string | undefined) | (string | undefined) | (string | undefined) | string | any | null | undefined;
94
+ };
95
+ /**
96
+ * @internal
97
+ * PatchRequest without any key transformation, this is what
98
+ * we expect to come in as network data
99
+ */
100
+ export type External$PatchRequest = {
101
+ description?: string | undefined;
102
+ name?: string | undefined;
103
+ workflow_id?: string | undefined;
104
+ id: string;
105
+ [additionalProperty: string]: (string | undefined) | (string | undefined) | (string | undefined) | string | External$PatchRequest | null | undefined;
106
+ };
107
+ export declare const Schemas$PatchRequest: {
108
+ in: z.ZodType<PatchRequest, z.ZodTypeDef, unknown>;
109
+ out: z.ZodType<External$PatchRequest, z.ZodTypeDef, PatchRequest>;
110
+ };
111
+ /**
112
+ * CreateRequest
113
+ */
114
+ export type CreateRequest = {
115
+ /**
116
+ * Whether the workflow is active
117
+ */
118
+ active?: boolean | undefined;
119
+ /**
120
+ * Description of the workflow
121
+ */
122
+ description: string;
123
+ /**
124
+ * Name of the workflow
125
+ */
126
+ name: string;
127
+ [additionalProperty: string]: (boolean | undefined) | string | string | any | null | undefined;
128
+ };
129
+ /**
130
+ * @internal
131
+ * CreateRequest without any key transformation, this is what
132
+ * we expect to come in as network data
133
+ */
134
+ export type External$CreateRequest = {
135
+ active?: boolean | undefined;
136
+ description: string;
137
+ name: string;
138
+ [additionalProperty: string]: (boolean | undefined) | string | string | External$CreateRequest | null | undefined;
139
+ };
140
+ export declare const Schemas$CreateRequest: {
141
+ in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
142
+ out: z.ZodType<External$CreateRequest, z.ZodTypeDef, CreateRequest>;
143
+ };
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by Sideko (sideko.dev)
4
+ **/
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Schemas$CreateRequest = exports.Schemas$PatchRequest = exports.Schemas$GetRequest = exports.Schemas$ListRequest = exports.Schemas$DeleteRequest = void 0;
40
+ const make_api_request_js_1 = require("make-api-request-js");
41
+ const z = __importStar(require("zod"));
42
+ /**
43
+ * Takes network data, validates it, and transforms keys to match typescript object DeleteRequest
44
+ */
45
+ const SchemaIn$DeleteRequest = z
46
+ .object({
47
+ id: z.string(),
48
+ })
49
+ .transform((obj) => {
50
+ return (0, make_api_request_js_1.zodTransform)(obj, {
51
+ id: "id",
52
+ });
53
+ });
54
+ /**
55
+ * @internal
56
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$DeleteRequest
57
+ */
58
+ const SchemaOut$DeleteRequest = z
59
+ .object({
60
+ id: z.string(),
61
+ })
62
+ .transform((obj) => {
63
+ return (0, make_api_request_js_1.zodTransform)(obj, {
64
+ id: "id",
65
+ });
66
+ });
67
+ exports.Schemas$DeleteRequest = {
68
+ in: SchemaIn$DeleteRequest,
69
+ out: SchemaOut$DeleteRequest,
70
+ };
71
+ /**
72
+ * Takes network data, validates it, and transforms keys to match typescript object ListRequest
73
+ */
74
+ const SchemaIn$ListRequest = z
75
+ .object({
76
+ limit: z.number().optional(),
77
+ page: z.number().optional(),
78
+ })
79
+ .transform((obj) => {
80
+ return (0, make_api_request_js_1.zodTransform)(obj, {
81
+ limit: "limit",
82
+ page: "page",
83
+ });
84
+ });
85
+ /**
86
+ * @internal
87
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$ListRequest
88
+ */
89
+ const SchemaOut$ListRequest = z
90
+ .object({
91
+ limit: z.number().optional(),
92
+ page: z.number().optional(),
93
+ })
94
+ .transform((obj) => {
95
+ return (0, make_api_request_js_1.zodTransform)(obj, {
96
+ limit: "limit",
97
+ page: "page",
98
+ });
99
+ });
100
+ exports.Schemas$ListRequest = {
101
+ in: SchemaIn$ListRequest,
102
+ out: SchemaOut$ListRequest,
103
+ };
104
+ /**
105
+ * Takes network data, validates it, and transforms keys to match typescript object GetRequest
106
+ */
107
+ const SchemaIn$GetRequest = z
108
+ .object({
109
+ id: z.string(),
110
+ })
111
+ .transform((obj) => {
112
+ return (0, make_api_request_js_1.zodTransform)(obj, {
113
+ id: "id",
114
+ });
115
+ });
116
+ /**
117
+ * @internal
118
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$GetRequest
119
+ */
120
+ const SchemaOut$GetRequest = z
121
+ .object({
122
+ id: z.string(),
123
+ })
124
+ .transform((obj) => {
125
+ return (0, make_api_request_js_1.zodTransform)(obj, {
126
+ id: "id",
127
+ });
128
+ });
129
+ exports.Schemas$GetRequest = {
130
+ in: SchemaIn$GetRequest,
131
+ out: SchemaOut$GetRequest,
132
+ };
133
+ /**
134
+ * Takes network data, validates it, and transforms keys to match typescript object PatchRequest
135
+ */
136
+ const SchemaIn$PatchRequest = z
137
+ .object({
138
+ description: z.string().optional(),
139
+ name: z.string().optional(),
140
+ workflow_id: z.string().optional(),
141
+ id: z.string(),
142
+ })
143
+ .catchall(make_api_request_js_1.zodRequiredAny)
144
+ .transform((obj) => {
145
+ return (0, make_api_request_js_1.zodTransform)(obj, {
146
+ description: "description",
147
+ name: "name",
148
+ workflow_id: "workflowId",
149
+ id: "id",
150
+ });
151
+ });
152
+ /**
153
+ * @internal
154
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$PatchRequest
155
+ */
156
+ const SchemaOut$PatchRequest = z
157
+ .object({
158
+ description: z.string().optional(),
159
+ name: z.string().optional(),
160
+ workflowId: z.string().optional(),
161
+ id: z.string(),
162
+ })
163
+ .catchall(make_api_request_js_1.zodRequiredAny)
164
+ .transform((obj) => {
165
+ return (0, make_api_request_js_1.zodTransform)(obj, {
166
+ description: "description",
167
+ name: "name",
168
+ workflowId: "workflow_id",
169
+ id: "id",
170
+ });
171
+ });
172
+ exports.Schemas$PatchRequest = {
173
+ in: SchemaIn$PatchRequest,
174
+ out: SchemaOut$PatchRequest,
175
+ };
176
+ /**
177
+ * Takes network data, validates it, and transforms keys to match typescript object CreateRequest
178
+ */
179
+ const SchemaIn$CreateRequest = z
180
+ .object({
181
+ active: z.boolean().optional(),
182
+ description: z.string(),
183
+ name: z.string(),
184
+ })
185
+ .catchall(make_api_request_js_1.zodRequiredAny)
186
+ .transform((obj) => {
187
+ return (0, make_api_request_js_1.zodTransform)(obj, {
188
+ active: "active",
189
+ description: "description",
190
+ name: "name",
191
+ });
192
+ });
193
+ /**
194
+ * @internal
195
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$CreateRequest
196
+ */
197
+ const SchemaOut$CreateRequest = z
198
+ .object({
199
+ active: z.boolean().optional(),
200
+ description: z.string(),
201
+ name: z.string(),
202
+ })
203
+ .catchall(make_api_request_js_1.zodRequiredAny)
204
+ .transform((obj) => {
205
+ return (0, make_api_request_js_1.zodTransform)(obj, {
206
+ active: "active",
207
+ description: "description",
208
+ name: "name",
209
+ });
210
+ });
211
+ exports.Schemas$CreateRequest = {
212
+ in: SchemaIn$CreateRequest,
213
+ out: SchemaOut$CreateRequest,
214
+ };
@@ -1,16 +1,70 @@
1
1
  /**
2
2
  * Generated by Sideko (sideko.dev)
3
3
  **/
4
- import { CoreClient, CoreResourceClient, ResourceClientOptions } from "make-api-request-js";
4
+ import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "make-api-request-js";
5
5
  import { DispatchClient } from "../../resources/workflows/dispatch";
6
6
  import { InvokeClient } from "../../resources/workflows/invoke";
7
+ import * as requests from "../../resources/workflows/request-types";
8
+ import { RunsClient } from "../../resources/workflows/runs";
9
+ import { VersionsClient } from "../../resources/workflows/versions";
10
+ import * as types from "../../types";
11
+ /**
12
+ * Generated by Sideko (sideko.dev)
13
+ **/
14
+ /**
15
+ * Generated by Sideko (sideko.dev)
16
+ **/
7
17
  /**
8
18
  * Generated by Sideko (sideko.dev)
9
19
  **/
10
20
  export declare class WorkflowsClient extends CoreResourceClient {
21
+ private _versionsLazy?;
22
+ private _runsLazy?;
11
23
  private _invokeLazy?;
12
24
  private _dispatchLazy?;
13
25
  constructor(coreClient: CoreClient, opts: ResourceClientOptions);
14
26
  get dispatch(): DispatchClient;
15
27
  get invoke(): InvokeClient;
28
+ get runs(): RunsClient;
29
+ get versions(): VersionsClient;
30
+ /**
31
+ * Delete a workflow
32
+ *
33
+ * Delete a workflow (workflow origin) and all its associated versions by the workflow origin ID.
34
+ *
35
+ * DELETE /workflows/{id}
36
+ */
37
+ delete(request: requests.DeleteRequest, opts?: RequestOptions): ApiPromise<types.WorkflowsDeleteResponse>;
38
+ /**
39
+ * List workflows
40
+ *
41
+ * Retrieve a paginated list of workflows (workflow origins) for the authenticated user. Each workflow origin represents a collection of workflow versions.
42
+ *
43
+ * GET /workflows
44
+ */
45
+ list(request?: requests.ListRequest, opts?: RequestOptions): ApiPromise<types.WorkflowsListResponseItem[]>;
46
+ /**
47
+ * Get a workflow
48
+ *
49
+ * Retrieve a single workflow (workflow origin) by its ID.
50
+ *
51
+ * GET /workflows/{id}
52
+ */
53
+ get(request: requests.GetRequest, opts?: RequestOptions): ApiPromise<types.WorkflowsGetResponse>;
54
+ /**
55
+ * Update a workflow
56
+ *
57
+ * Update an existing workflow (workflow origin) by its ID. Only the provided fields will be updated.
58
+ *
59
+ * PATCH /workflows/{id}
60
+ */
61
+ patch(request: requests.PatchRequest, opts?: RequestOptions): ApiPromise<types.WorkflowsPatchResponse>;
62
+ /**
63
+ * Create a workflow
64
+ *
65
+ * Create a new workflow (workflow origin). This creates the top-level workflow container that holds versioned workflow definitions.
66
+ *
67
+ * POST /workflows
68
+ */
69
+ create(request: requests.CreateRequest, opts?: RequestOptions): ApiPromise<types.WorkflowsCreateResponse>;
16
70
  }
@@ -2,9 +2,56 @@
2
2
  /**
3
3
  * Generated by Sideko (sideko.dev)
4
4
  **/
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
5
38
  Object.defineProperty(exports, "__esModule", { value: true });
6
39
  exports.WorkflowsClient = void 0;
7
40
  const make_api_request_js_1 = require("make-api-request-js");
41
+ const z = __importStar(require("zod"));
42
+ const workflows_create_body_1 = require("../../types/workflows-create-body");
43
+ const workflows_create_response_1 = require("../../types/workflows-create-response");
44
+ const workflows_delete_response_1 = require("../../types/workflows-delete-response");
45
+ const workflows_get_response_1 = require("../../types/workflows-get-response");
46
+ const workflows_list_response_item_1 = require("../../types/workflows-list-response-item");
47
+ const workflows_patch_body_1 = require("../../types/workflows-patch-body");
48
+ const workflows_patch_response_1 = require("../../types/workflows-patch-response");
49
+ /**
50
+ * Generated by Sideko (sideko.dev)
51
+ **/
52
+ /**
53
+ * Generated by Sideko (sideko.dev)
54
+ **/
8
55
  /**
9
56
  * Generated by Sideko (sideko.dev)
10
57
  **/
@@ -14,6 +61,8 @@ class WorkflowsClient extends make_api_request_js_1.CoreResourceClient {
14
61
  if (this._opts.lazyLoad === false) {
15
62
  this.dispatch;
16
63
  this.invoke;
64
+ this.runs;
65
+ this.versions;
17
66
  }
18
67
  }
19
68
  get dispatch() {
@@ -24,5 +73,111 @@ class WorkflowsClient extends make_api_request_js_1.CoreResourceClient {
24
73
  var _a;
25
74
  return ((_a = this._invokeLazy) !== null && _a !== void 0 ? _a : (this._invokeLazy = new (require("./invoke").InvokeClient)(this._client, this._opts)));
26
75
  }
76
+ get runs() {
77
+ var _a;
78
+ return ((_a = this._runsLazy) !== null && _a !== void 0 ? _a : (this._runsLazy = new (require("./runs").RunsClient)(this._client, this._opts)));
79
+ }
80
+ get versions() {
81
+ var _a;
82
+ return ((_a = this._versionsLazy) !== null && _a !== void 0 ? _a : (this._versionsLazy = new (require("./versions").VersionsClient)(this._client, this._opts)));
83
+ }
84
+ /**
85
+ * Delete a workflow
86
+ *
87
+ * Delete a workflow (workflow origin) and all its associated versions by the workflow origin ID.
88
+ *
89
+ * DELETE /workflows/{id}
90
+ */
91
+ delete(request, opts) {
92
+ return this._client.makeRequest({
93
+ method: "delete",
94
+ path: `/workflows/${request.id}`,
95
+ auth: ["ApiKeyAuth", "BearerAuth"],
96
+ responseSchema: workflows_delete_response_1.Schemas$WorkflowsDeleteResponse.in,
97
+ opts,
98
+ });
99
+ }
100
+ /**
101
+ * List workflows
102
+ *
103
+ * Retrieve a paginated list of workflows (workflow origins) for the authenticated user. Each workflow origin represents a collection of workflow versions.
104
+ *
105
+ * GET /workflows
106
+ */
107
+ list(request = {}, opts) {
108
+ return this._client.makeRequest({
109
+ method: "get",
110
+ path: "/workflows",
111
+ auth: ["ApiKeyAuth", "BearerAuth"],
112
+ query: [
113
+ (0, make_api_request_js_1.encodeQueryParam)({
114
+ name: "limit",
115
+ value: z.number().optional().parse(request.limit),
116
+ style: "form",
117
+ explode: true,
118
+ }),
119
+ (0, make_api_request_js_1.encodeQueryParam)({
120
+ name: "page",
121
+ value: z.number().optional().parse(request.page),
122
+ style: "form",
123
+ explode: true,
124
+ }),
125
+ ],
126
+ responseSchema: z.array(workflows_list_response_item_1.Schemas$WorkflowsListResponseItem.in),
127
+ opts,
128
+ });
129
+ }
130
+ /**
131
+ * Get a workflow
132
+ *
133
+ * Retrieve a single workflow (workflow origin) by its ID.
134
+ *
135
+ * GET /workflows/{id}
136
+ */
137
+ get(request, opts) {
138
+ return this._client.makeRequest({
139
+ method: "get",
140
+ path: `/workflows/${request.id}`,
141
+ auth: ["ApiKeyAuth", "BearerAuth"],
142
+ responseSchema: workflows_get_response_1.Schemas$WorkflowsGetResponse.in,
143
+ opts,
144
+ });
145
+ }
146
+ /**
147
+ * Update a workflow
148
+ *
149
+ * Update an existing workflow (workflow origin) by its ID. Only the provided fields will be updated.
150
+ *
151
+ * PATCH /workflows/{id}
152
+ */
153
+ patch(request, opts) {
154
+ return this._client.makeRequest({
155
+ method: "patch",
156
+ path: `/workflows/${request.id}`,
157
+ auth: ["ApiKeyAuth", "BearerAuth"],
158
+ contentType: "application/json",
159
+ body: workflows_patch_body_1.Schemas$WorkflowsPatchBody.out.parse(request),
160
+ responseSchema: workflows_patch_response_1.Schemas$WorkflowsPatchResponse.in,
161
+ opts,
162
+ });
163
+ }
164
+ /**
165
+ * Create a workflow
166
+ *
167
+ * Create a new workflow (workflow origin). This creates the top-level workflow container that holds versioned workflow definitions.
168
+ *
169
+ * POST /workflows
170
+ */
171
+ create(request, opts) {
172
+ return this._client.makeRequest({
173
+ method: "post",
174
+ path: "/workflows",
175
+ auth: ["ApiKeyAuth", "BearerAuth"],
176
+ contentType: "application/json",
177
+ body: workflows_create_body_1.Schemas$WorkflowsCreateBody.out.parse(request),
178
+ responseSchema: workflows_create_response_1.Schemas$WorkflowsCreateResponse.in,
179
+ opts,
180
+ });
181
+ }
27
182
  }
28
183
  exports.WorkflowsClient = WorkflowsClient;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Generated by Sideko (sideko.dev)
3
+ **/
4
+ export { CreateRequest } from "./request-types";
5
+ export { DispatchClient } from "./resource-client";
6
+ /**
7
+ * Generated by Sideko (sideko.dev)
8
+ **/
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by Sideko (sideko.dev)
4
+ **/
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DispatchClient = void 0;
7
+ var resource_client_1 = require("./resource-client");
8
+ Object.defineProperty(exports, "DispatchClient", { enumerable: true, get: function () { return resource_client_1.DispatchClient; } });
9
+ /**
10
+ * Generated by Sideko (sideko.dev)
11
+ **/
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Generated by Sideko (sideko.dev)
3
+ **/
4
+ import * as z from "zod";
5
+ /**
6
+ * CreateRequest
7
+ */
8
+ export type CreateRequest = {
9
+ /**
10
+ * The workflow run ID to dispatch
11
+ */
12
+ id: string;
13
+ };
14
+ /**
15
+ * @internal
16
+ * CreateRequest without any key transformation, this is what
17
+ * we expect to come in as network data
18
+ */
19
+ export type External$CreateRequest = {
20
+ id: string;
21
+ };
22
+ export declare const Schemas$CreateRequest: {
23
+ in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
24
+ out: z.ZodType<External$CreateRequest, z.ZodTypeDef, CreateRequest>;
25
+ };