ittybit 0.8.7 → 0.9.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 (320) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ittybit/automations/client.rb +61 -58
  3. data/lib/ittybit/automations/types/automations_create_request_workflow_item.rb +81 -0
  4. data/lib/ittybit/automations/types/automations_create_request_workflow_item_kind.rb +20 -0
  5. data/lib/ittybit/automations/types/automations_create_request_workflow_item_next_item.rb +71 -0
  6. data/lib/ittybit/automations/types/automations_create_response.rb +107 -0
  7. data/lib/ittybit/automations/types/automations_create_response_data.rb +133 -0
  8. data/lib/ittybit/automations/types/automations_create_response_data_status.rb +10 -0
  9. data/lib/ittybit/automations/types/automations_create_response_data_trigger.rb +67 -0
  10. data/lib/ittybit/automations/types/automations_create_response_data_workflow_item.rb +61 -0
  11. data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_conditions.rb +86 -0
  12. data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_conditions_conditions_item.rb +72 -0
  13. data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_conditions_next_item.rb +71 -0
  14. data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_ref.rb +83 -0
  15. data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_ref_kind.rb +20 -0
  16. data/lib/ittybit/automations/types/automations_create_response_data_workflow_item_ref_next_item.rb +71 -0
  17. data/lib/ittybit/automations/types/automations_create_response_error.rb +59 -0
  18. data/lib/ittybit/automations/types/automations_create_response_links.rb +69 -0
  19. data/lib/ittybit/automations/types/automations_create_response_meta.rb +98 -0
  20. data/lib/ittybit/automations/types/automations_create_response_meta_type.rb +10 -0
  21. data/lib/ittybit/automations/types/automations_delete_response.rb +107 -0
  22. data/lib/ittybit/automations/types/automations_delete_response_data.rb +59 -0
  23. data/lib/ittybit/automations/types/automations_delete_response_error.rb +59 -0
  24. data/lib/ittybit/automations/types/automations_delete_response_links.rb +69 -0
  25. data/lib/ittybit/automations/types/automations_delete_response_meta.rb +98 -0
  26. data/lib/ittybit/automations/types/automations_delete_response_meta_type.rb +10 -0
  27. data/lib/ittybit/automations/types/automations_get_response.rb +107 -0
  28. data/lib/ittybit/automations/types/automations_get_response_data.rb +133 -0
  29. data/lib/ittybit/automations/types/automations_get_response_data_status.rb +10 -0
  30. data/lib/ittybit/automations/types/automations_get_response_data_trigger.rb +67 -0
  31. data/lib/ittybit/automations/types/automations_get_response_data_workflow_item.rb +61 -0
  32. data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_conditions.rb +86 -0
  33. data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_conditions_conditions_item.rb +71 -0
  34. data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_conditions_next_item.rb +71 -0
  35. data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_ref.rb +83 -0
  36. data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_ref_kind.rb +20 -0
  37. data/lib/ittybit/automations/types/automations_get_response_data_workflow_item_ref_next_item.rb +71 -0
  38. data/lib/ittybit/automations/types/automations_get_response_error.rb +59 -0
  39. data/lib/ittybit/automations/types/automations_get_response_links.rb +69 -0
  40. data/lib/ittybit/automations/types/automations_get_response_meta.rb +98 -0
  41. data/lib/ittybit/automations/types/automations_get_response_meta_type.rb +10 -0
  42. data/lib/ittybit/automations/types/automations_list_response.rb +105 -0
  43. data/lib/ittybit/automations/types/automations_list_response_data_item.rb +133 -0
  44. data/lib/ittybit/automations/types/automations_list_response_data_item_status.rb +10 -0
  45. data/lib/ittybit/automations/types/automations_list_response_data_item_trigger.rb +68 -0
  46. data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item.rb +61 -0
  47. data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_conditions.rb +86 -0
  48. data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_conditions_conditions_item.rb +72 -0
  49. data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_conditions_next_item.rb +71 -0
  50. data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_ref.rb +83 -0
  51. data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_ref_kind.rb +20 -0
  52. data/lib/ittybit/automations/types/automations_list_response_data_item_workflow_item_ref_next_item.rb +71 -0
  53. data/lib/ittybit/automations/types/automations_list_response_error.rb +59 -0
  54. data/lib/ittybit/automations/types/automations_list_response_links.rb +90 -0
  55. data/lib/ittybit/automations/types/automations_list_response_meta.rb +130 -0
  56. data/lib/ittybit/automations/types/automations_list_response_meta_type.rb +10 -0
  57. data/lib/ittybit/automations/types/automations_update_request_workflow_item.rb +81 -0
  58. data/lib/ittybit/automations/types/automations_update_request_workflow_item_kind.rb +20 -0
  59. data/lib/ittybit/automations/types/automations_update_request_workflow_item_next_item.rb +71 -0
  60. data/lib/ittybit/automations/types/automations_update_response.rb +107 -0
  61. data/lib/ittybit/automations/types/automations_update_response_data.rb +133 -0
  62. data/lib/ittybit/automations/types/automations_update_response_data_status.rb +10 -0
  63. data/lib/ittybit/automations/types/automations_update_response_data_trigger.rb +67 -0
  64. data/lib/ittybit/automations/types/automations_update_response_data_workflow_item.rb +61 -0
  65. data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_conditions.rb +86 -0
  66. data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_conditions_conditions_item.rb +72 -0
  67. data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_conditions_next_item.rb +71 -0
  68. data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_ref.rb +83 -0
  69. data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_ref_kind.rb +20 -0
  70. data/lib/ittybit/automations/types/automations_update_response_data_workflow_item_ref_next_item.rb +71 -0
  71. data/lib/ittybit/automations/types/automations_update_response_error.rb +59 -0
  72. data/lib/ittybit/automations/types/automations_update_response_links.rb +69 -0
  73. data/lib/ittybit/automations/types/automations_update_response_meta.rb +98 -0
  74. data/lib/ittybit/automations/types/automations_update_response_meta_type.rb +10 -0
  75. data/lib/ittybit/files/client.rb +47 -45
  76. data/lib/ittybit/files/types/files_create_response.rb +107 -0
  77. data/lib/ittybit/files/types/files_create_response_data.rb +317 -0
  78. data/lib/ittybit/files/types/files_create_response_data_kind.rb +11 -0
  79. data/lib/ittybit/files/types/files_create_response_data_object.rb +11 -0
  80. data/lib/ittybit/files/types/files_create_response_data_status.rb +12 -0
  81. data/lib/ittybit/files/types/files_create_response_error.rb +59 -0
  82. data/lib/ittybit/files/types/files_create_response_links.rb +69 -0
  83. data/lib/ittybit/files/types/files_create_response_meta.rb +98 -0
  84. data/lib/ittybit/files/types/files_create_response_meta_type.rb +10 -0
  85. data/lib/ittybit/files/types/files_delete_response.rb +107 -0
  86. data/lib/ittybit/files/types/files_delete_response_data.rb +59 -0
  87. data/lib/ittybit/files/types/files_delete_response_error.rb +59 -0
  88. data/lib/ittybit/files/types/files_delete_response_links.rb +69 -0
  89. data/lib/ittybit/files/types/files_delete_response_meta.rb +98 -0
  90. data/lib/ittybit/files/types/files_delete_response_meta_type.rb +10 -0
  91. data/lib/ittybit/files/types/files_get_response.rb +107 -0
  92. data/lib/ittybit/files/types/files_get_response_data.rb +317 -0
  93. data/lib/ittybit/files/types/files_get_response_data_kind.rb +11 -0
  94. data/lib/ittybit/files/types/files_get_response_data_object.rb +11 -0
  95. data/lib/ittybit/files/types/files_get_response_data_status.rb +12 -0
  96. data/lib/ittybit/files/types/files_get_response_error.rb +59 -0
  97. data/lib/ittybit/files/types/files_get_response_links.rb +69 -0
  98. data/lib/ittybit/files/types/files_get_response_meta.rb +98 -0
  99. data/lib/ittybit/files/types/files_get_response_meta_type.rb +10 -0
  100. data/lib/ittybit/files/types/files_list_response.rb +105 -0
  101. data/lib/ittybit/files/types/files_list_response_data_item.rb +317 -0
  102. data/lib/ittybit/files/types/files_list_response_data_item_kind.rb +11 -0
  103. data/lib/ittybit/files/types/files_list_response_data_item_object.rb +11 -0
  104. data/lib/ittybit/files/types/files_list_response_data_item_status.rb +12 -0
  105. data/lib/ittybit/files/types/files_list_response_error.rb +59 -0
  106. data/lib/ittybit/files/types/files_list_response_links.rb +90 -0
  107. data/lib/ittybit/files/types/files_list_response_meta.rb +130 -0
  108. data/lib/ittybit/files/types/files_list_response_meta_type.rb +10 -0
  109. data/lib/ittybit/files/types/files_update_response.rb +107 -0
  110. data/lib/ittybit/files/types/files_update_response_data.rb +317 -0
  111. data/lib/ittybit/files/types/files_update_response_data_kind.rb +11 -0
  112. data/lib/ittybit/files/types/files_update_response_data_object.rb +11 -0
  113. data/lib/ittybit/files/types/files_update_response_data_status.rb +12 -0
  114. data/lib/ittybit/files/types/files_update_response_error.rb +59 -0
  115. data/lib/ittybit/files/types/files_update_response_links.rb +69 -0
  116. data/lib/ittybit/files/types/files_update_response_meta.rb +98 -0
  117. data/lib/ittybit/files/types/files_update_response_meta_type.rb +10 -0
  118. data/lib/ittybit/media/client.rb +42 -40
  119. data/lib/ittybit/media/types/media_create_response.rb +107 -0
  120. data/lib/ittybit/media/types/media_create_response_data.rb +175 -0
  121. data/lib/ittybit/media/types/media_create_response_data_files_item.rb +262 -0
  122. data/lib/ittybit/media/types/media_create_response_data_files_item_kind.rb +11 -0
  123. data/lib/ittybit/media/types/media_create_response_data_files_item_object.rb +11 -0
  124. data/lib/ittybit/media/types/media_create_response_data_files_item_orientation.rb +11 -0
  125. data/lib/ittybit/media/types/media_create_response_data_files_item_status.rb +12 -0
  126. data/lib/ittybit/media/types/media_create_response_data_kind.rb +11 -0
  127. data/lib/ittybit/media/types/media_create_response_error.rb +59 -0
  128. data/lib/ittybit/media/types/media_create_response_links.rb +69 -0
  129. data/lib/ittybit/media/types/media_create_response_meta.rb +98 -0
  130. data/lib/ittybit/media/types/media_create_response_meta_type.rb +10 -0
  131. data/lib/ittybit/media/types/media_delete_response.rb +107 -0
  132. data/lib/ittybit/media/types/media_delete_response_data.rb +59 -0
  133. data/lib/ittybit/media/types/media_delete_response_error.rb +59 -0
  134. data/lib/ittybit/media/types/media_delete_response_links.rb +69 -0
  135. data/lib/ittybit/media/types/media_delete_response_meta.rb +98 -0
  136. data/lib/ittybit/media/types/media_delete_response_meta_type.rb +10 -0
  137. data/lib/ittybit/media/types/media_get_response.rb +107 -0
  138. data/lib/ittybit/media/types/media_get_response_data.rb +175 -0
  139. data/lib/ittybit/media/types/media_get_response_data_files_item.rb +262 -0
  140. data/lib/ittybit/media/types/media_get_response_data_files_item_kind.rb +11 -0
  141. data/lib/ittybit/media/types/media_get_response_data_files_item_object.rb +11 -0
  142. data/lib/ittybit/media/types/media_get_response_data_files_item_orientation.rb +11 -0
  143. data/lib/ittybit/media/types/media_get_response_data_files_item_status.rb +12 -0
  144. data/lib/ittybit/media/types/media_get_response_data_kind.rb +11 -0
  145. data/lib/ittybit/media/types/media_get_response_error.rb +59 -0
  146. data/lib/ittybit/media/types/media_get_response_links.rb +69 -0
  147. data/lib/ittybit/media/types/media_get_response_meta.rb +98 -0
  148. data/lib/ittybit/media/types/media_get_response_meta_type.rb +10 -0
  149. data/lib/ittybit/media/types/media_update_response.rb +107 -0
  150. data/lib/ittybit/media/types/media_update_response_data.rb +175 -0
  151. data/lib/ittybit/media/types/media_update_response_data_files_item.rb +262 -0
  152. data/lib/ittybit/media/types/media_update_response_data_files_item_kind.rb +11 -0
  153. data/lib/ittybit/media/types/media_update_response_data_files_item_object.rb +11 -0
  154. data/lib/ittybit/media/types/media_update_response_data_files_item_orientation.rb +11 -0
  155. data/lib/ittybit/media/types/media_update_response_data_files_item_status.rb +12 -0
  156. data/lib/ittybit/media/types/media_update_response_data_kind.rb +11 -0
  157. data/lib/ittybit/media/types/media_update_response_error.rb +59 -0
  158. data/lib/ittybit/media/types/media_update_response_links.rb +69 -0
  159. data/lib/ittybit/media/types/media_update_response_meta.rb +98 -0
  160. data/lib/ittybit/media/types/media_update_response_meta_type.rb +10 -0
  161. data/lib/ittybit/signatures/client.rb +9 -9
  162. data/lib/ittybit/signatures/types/signatures_create_response.rb +107 -0
  163. data/lib/ittybit/signatures/types/signatures_create_response_data.rb +112 -0
  164. data/lib/ittybit/signatures/types/signatures_create_response_error.rb +59 -0
  165. data/lib/ittybit/signatures/types/signatures_create_response_links.rb +69 -0
  166. data/lib/ittybit/signatures/types/signatures_create_response_meta.rb +98 -0
  167. data/lib/ittybit/signatures/types/signatures_create_response_meta_type.rb +10 -0
  168. data/lib/ittybit/tasks/client.rb +35 -30
  169. data/lib/ittybit/tasks/types/tasks_create_response.rb +107 -0
  170. data/lib/ittybit/tasks/types/tasks_create_response_data.rb +186 -0
  171. data/lib/ittybit/tasks/types/tasks_create_response_data_kind.rb +23 -0
  172. data/lib/ittybit/tasks/types/tasks_create_response_data_results.rb +76 -0
  173. data/lib/ittybit/tasks/types/tasks_create_response_data_status.rb +16 -0
  174. data/lib/ittybit/tasks/types/tasks_create_response_error.rb +59 -0
  175. data/lib/ittybit/tasks/types/tasks_create_response_links.rb +69 -0
  176. data/lib/ittybit/tasks/types/tasks_create_response_meta.rb +98 -0
  177. data/lib/ittybit/tasks/types/tasks_create_response_meta_type.rb +10 -0
  178. data/lib/ittybit/tasks/types/tasks_get_response.rb +107 -0
  179. data/lib/ittybit/tasks/types/tasks_get_response_data.rb +186 -0
  180. data/lib/ittybit/tasks/types/tasks_get_response_data_kind.rb +23 -0
  181. data/lib/ittybit/tasks/types/tasks_get_response_data_results.rb +76 -0
  182. data/lib/ittybit/tasks/types/tasks_get_response_data_status.rb +16 -0
  183. data/lib/ittybit/tasks/types/tasks_get_response_error.rb +59 -0
  184. data/lib/ittybit/tasks/types/tasks_get_response_links.rb +69 -0
  185. data/lib/ittybit/tasks/types/tasks_get_response_meta.rb +98 -0
  186. data/lib/ittybit/tasks/types/tasks_get_response_meta_type.rb +10 -0
  187. data/lib/ittybit/tasks/types/tasks_list_response.rb +105 -0
  188. data/lib/ittybit/tasks/types/tasks_list_response_data_item.rb +186 -0
  189. data/lib/ittybit/tasks/types/tasks_list_response_data_item_kind.rb +23 -0
  190. data/lib/ittybit/tasks/types/tasks_list_response_data_item_results.rb +76 -0
  191. data/lib/ittybit/tasks/types/tasks_list_response_data_item_status.rb +16 -0
  192. data/lib/ittybit/tasks/types/tasks_list_response_error.rb +59 -0
  193. data/lib/ittybit/tasks/types/tasks_list_response_links.rb +90 -0
  194. data/lib/ittybit/tasks/types/tasks_list_response_meta.rb +130 -0
  195. data/lib/ittybit/tasks/types/tasks_list_response_meta_type.rb +10 -0
  196. data/lib/ittybit/types/automation_list_response.rb +19 -19
  197. data/lib/ittybit/types/automation_list_response_data_item.rb +131 -0
  198. data/lib/ittybit/types/automation_list_response_data_item_status.rb +8 -0
  199. data/lib/ittybit/types/automation_list_response_data_item_trigger.rb +66 -0
  200. data/lib/ittybit/types/automation_list_response_data_item_workflow_item.rb +57 -0
  201. data/lib/ittybit/types/automation_list_response_data_item_workflow_item_conditions.rb +84 -0
  202. data/lib/ittybit/types/automation_list_response_data_item_workflow_item_conditions_conditions_item.rb +70 -0
  203. data/lib/ittybit/types/automation_list_response_data_item_workflow_item_conditions_next_item.rb +69 -0
  204. data/lib/ittybit/types/automation_list_response_data_item_workflow_item_ref.rb +81 -0
  205. data/lib/ittybit/types/automation_list_response_data_item_workflow_item_ref_kind.rb +18 -0
  206. data/lib/ittybit/types/automation_list_response_data_item_workflow_item_ref_next_item.rb +69 -0
  207. data/lib/ittybit/types/automation_list_response_error.rb +57 -0
  208. data/lib/ittybit/types/automation_list_response_links.rb +88 -0
  209. data/lib/ittybit/types/automation_list_response_meta.rb +128 -0
  210. data/lib/ittybit/types/automation_list_response_meta_type.rb +8 -0
  211. data/lib/ittybit/types/automation_response.rb +25 -20
  212. data/lib/ittybit/types/automation_response_data.rb +131 -0
  213. data/lib/ittybit/types/automation_response_data_status.rb +8 -0
  214. data/lib/ittybit/types/automation_response_data_trigger.rb +65 -0
  215. data/lib/ittybit/types/automation_response_data_workflow_item.rb +54 -0
  216. data/lib/ittybit/types/automation_response_data_workflow_item_conditions.rb +84 -0
  217. data/lib/ittybit/types/automation_response_data_workflow_item_conditions_conditions_item.rb +69 -0
  218. data/lib/ittybit/types/automation_response_data_workflow_item_conditions_next_item.rb +69 -0
  219. data/lib/ittybit/types/automation_response_data_workflow_item_ref.rb +80 -0
  220. data/lib/ittybit/types/automation_response_data_workflow_item_ref_kind.rb +18 -0
  221. data/lib/ittybit/types/automation_response_data_workflow_item_ref_next_item.rb +69 -0
  222. data/lib/ittybit/types/automation_response_error.rb +57 -0
  223. data/lib/ittybit/types/automation_response_links.rb +67 -0
  224. data/lib/ittybit/types/automation_response_meta.rb +96 -0
  225. data/lib/ittybit/types/automation_response_meta_type.rb +8 -0
  226. data/lib/ittybit/types/automation_workflow_item.rb +8 -8
  227. data/lib/ittybit/types/automation_workflow_item_conditions.rb +82 -0
  228. data/lib/ittybit/types/automation_workflow_item_conditions_conditions_item.rb +69 -0
  229. data/lib/ittybit/types/automation_workflow_item_conditions_next_item.rb +69 -0
  230. data/lib/ittybit/types/automation_workflow_item_ref.rb +79 -0
  231. data/lib/ittybit/types/automation_workflow_item_ref_kind.rb +18 -0
  232. data/lib/ittybit/types/automation_workflow_item_ref_next_item.rb +67 -0
  233. data/lib/ittybit/types/confirmation_response.rb +25 -20
  234. data/lib/ittybit/types/confirmation_response_data.rb +57 -0
  235. data/lib/ittybit/types/confirmation_response_error.rb +57 -0
  236. data/lib/ittybit/types/confirmation_response_links.rb +67 -0
  237. data/lib/ittybit/types/confirmation_response_meta.rb +96 -0
  238. data/lib/ittybit/types/confirmation_response_meta_type.rb +8 -0
  239. data/lib/ittybit/types/created_by.rb +5 -0
  240. data/lib/ittybit/types/error.rb +1 -53
  241. data/lib/ittybit/types/file_list_response.rb +19 -19
  242. data/lib/ittybit/types/file_list_response_data_item.rb +315 -0
  243. data/lib/ittybit/types/file_list_response_data_item_kind.rb +9 -0
  244. data/lib/ittybit/types/file_list_response_data_item_object.rb +9 -0
  245. data/lib/ittybit/types/file_list_response_data_item_status.rb +10 -0
  246. data/lib/ittybit/types/file_list_response_error.rb +57 -0
  247. data/lib/ittybit/types/file_list_response_links.rb +88 -0
  248. data/lib/ittybit/types/file_list_response_meta.rb +128 -0
  249. data/lib/ittybit/types/file_list_response_meta_type.rb +8 -0
  250. data/lib/ittybit/types/file_response.rb +25 -20
  251. data/lib/ittybit/types/file_response_data.rb +315 -0
  252. data/lib/ittybit/types/file_response_data_kind.rb +9 -0
  253. data/lib/ittybit/types/file_response_data_object.rb +9 -0
  254. data/lib/ittybit/types/file_response_data_status.rb +10 -0
  255. data/lib/ittybit/types/file_response_error.rb +57 -0
  256. data/lib/ittybit/types/file_response_links.rb +67 -0
  257. data/lib/ittybit/types/file_response_meta.rb +96 -0
  258. data/lib/ittybit/types/file_response_meta_type.rb +8 -0
  259. data/lib/ittybit/types/kind.rb +21 -0
  260. data/lib/ittybit/types/media.rb +4 -4
  261. data/lib/ittybit/types/media_files_item.rb +260 -0
  262. data/lib/ittybit/types/media_files_item_kind.rb +9 -0
  263. data/lib/ittybit/types/media_files_item_object.rb +9 -0
  264. data/lib/ittybit/types/media_files_item_orientation.rb +9 -0
  265. data/lib/ittybit/types/media_files_item_status.rb +10 -0
  266. data/lib/ittybit/types/media_list_response.rb +19 -19
  267. data/lib/ittybit/types/media_list_response_data_item.rb +173 -0
  268. data/lib/ittybit/types/media_list_response_data_item_files_item.rb +260 -0
  269. data/lib/ittybit/types/media_list_response_data_item_files_item_kind.rb +9 -0
  270. data/lib/ittybit/types/media_list_response_data_item_files_item_object.rb +9 -0
  271. data/lib/ittybit/types/media_list_response_data_item_files_item_orientation.rb +9 -0
  272. data/lib/ittybit/types/media_list_response_data_item_files_item_status.rb +10 -0
  273. data/lib/ittybit/types/media_list_response_data_item_kind.rb +9 -0
  274. data/lib/ittybit/types/media_list_response_error.rb +57 -0
  275. data/lib/ittybit/types/media_list_response_links.rb +88 -0
  276. data/lib/ittybit/types/media_list_response_meta.rb +128 -0
  277. data/lib/ittybit/types/media_list_response_meta_type.rb +8 -0
  278. data/lib/ittybit/types/media_response.rb +25 -20
  279. data/lib/ittybit/types/media_response_data.rb +173 -0
  280. data/lib/ittybit/types/media_response_data_files_item.rb +260 -0
  281. data/lib/ittybit/types/media_response_data_files_item_kind.rb +9 -0
  282. data/lib/ittybit/types/media_response_data_files_item_object.rb +9 -0
  283. data/lib/ittybit/types/media_response_data_files_item_orientation.rb +9 -0
  284. data/lib/ittybit/types/media_response_data_files_item_status.rb +10 -0
  285. data/lib/ittybit/types/media_response_data_kind.rb +9 -0
  286. data/lib/ittybit/types/media_response_error.rb +57 -0
  287. data/lib/ittybit/types/media_response_links.rb +67 -0
  288. data/lib/ittybit/types/media_response_meta.rb +96 -0
  289. data/lib/ittybit/types/media_response_meta_type.rb +8 -0
  290. data/lib/ittybit/types/parent_id.rb +5 -0
  291. data/lib/ittybit/types/progress.rb +5 -0
  292. data/lib/ittybit/types/signature_response.rb +25 -20
  293. data/lib/ittybit/types/signature_response_data.rb +110 -0
  294. data/lib/ittybit/types/signature_response_error.rb +57 -0
  295. data/lib/ittybit/types/signature_response_links.rb +67 -0
  296. data/lib/ittybit/types/signature_response_meta.rb +96 -0
  297. data/lib/ittybit/types/signature_response_meta_type.rb +8 -0
  298. data/lib/ittybit/types/status.rb +14 -0
  299. data/lib/ittybit/types/task_list_response.rb +19 -19
  300. data/lib/ittybit/types/task_list_response_data_item.rb +184 -0
  301. data/lib/ittybit/types/task_list_response_data_item_kind.rb +21 -0
  302. data/lib/ittybit/types/task_list_response_data_item_results.rb +74 -0
  303. data/lib/ittybit/types/task_list_response_data_item_status.rb +14 -0
  304. data/lib/ittybit/types/task_list_response_error.rb +57 -0
  305. data/lib/ittybit/types/task_list_response_links.rb +88 -0
  306. data/lib/ittybit/types/task_list_response_meta.rb +128 -0
  307. data/lib/ittybit/types/task_list_response_meta_type.rb +8 -0
  308. data/lib/ittybit/types/task_response.rb +25 -20
  309. data/lib/ittybit/types/task_response_data.rb +184 -0
  310. data/lib/ittybit/types/task_response_data_kind.rb +21 -0
  311. data/lib/ittybit/types/task_response_data_results.rb +74 -0
  312. data/lib/ittybit/types/task_response_data_status.rb +14 -0
  313. data/lib/ittybit/types/task_response_error.rb +57 -0
  314. data/lib/ittybit/types/task_response_links.rb +67 -0
  315. data/lib/ittybit/types/task_response_meta.rb +96 -0
  316. data/lib/ittybit/types/task_response_meta_type.rb +8 -0
  317. data/lib/ittybit.rb +8 -8
  318. data/lib/requests.rb +24 -24
  319. data/lib/types_export.rb +300 -2
  320. metadata +299 -2
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Ittybit
7
+ class Automations
8
+ class AutomationsUpdateResponseError
9
+ # @return [String]
10
+ attr_reader :message
11
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
12
+ attr_reader :additional_properties
13
+ # @return [Object]
14
+ attr_reader :_field_set
15
+ protected :_field_set
16
+
17
+ OMIT = Object.new
18
+
19
+ # @param message [String]
20
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
21
+ # @return [Ittybit::Automations::AutomationsUpdateResponseError]
22
+ def initialize(message: OMIT, additional_properties: nil)
23
+ @message = message if message != OMIT
24
+ @additional_properties = additional_properties
25
+ @_field_set = { "message": message }.reject do |_k, v|
26
+ v == OMIT
27
+ end
28
+ end
29
+
30
+ # Deserialize a JSON object to an instance of AutomationsUpdateResponseError
31
+ #
32
+ # @param json_object [String]
33
+ # @return [Ittybit::Automations::AutomationsUpdateResponseError]
34
+ def self.from_json(json_object:)
35
+ struct = JSON.parse(json_object, object_class: OpenStruct)
36
+ parsed_json = JSON.parse(json_object)
37
+ message = parsed_json["message"]
38
+ new(message: message, additional_properties: struct)
39
+ end
40
+
41
+ # Serialize an instance of AutomationsUpdateResponseError to a JSON object
42
+ #
43
+ # @return [String]
44
+ def to_json(*_args)
45
+ @_field_set&.to_json
46
+ end
47
+
48
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
49
+ # hash and check each fields type against the current object's property
50
+ # definitions.
51
+ #
52
+ # @param obj [Object]
53
+ # @return [Void]
54
+ def self.validate_raw(obj:)
55
+ obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Ittybit
7
+ class Automations
8
+ class AutomationsUpdateResponseLinks
9
+ # @return [String]
10
+ attr_reader :self_
11
+ # @return [String]
12
+ attr_reader :parent
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param self_ [String]
22
+ # @param parent [String]
23
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
24
+ # @return [Ittybit::Automations::AutomationsUpdateResponseLinks]
25
+ def initialize(self_: OMIT, parent: OMIT, additional_properties: nil)
26
+ @self_ = self_ if self_ != OMIT
27
+ @parent = parent if parent != OMIT
28
+ @additional_properties = additional_properties
29
+ @_field_set = { "self": self_, "parent": parent }.reject do |_k, v|
30
+ v == OMIT
31
+ end
32
+ end
33
+
34
+ # Deserialize a JSON object to an instance of AutomationsUpdateResponseLinks
35
+ #
36
+ # @param json_object [String]
37
+ # @return [Ittybit::Automations::AutomationsUpdateResponseLinks]
38
+ def self.from_json(json_object:)
39
+ struct = JSON.parse(json_object, object_class: OpenStruct)
40
+ parsed_json = JSON.parse(json_object)
41
+ self_ = parsed_json["self"]
42
+ parent = parsed_json["parent"]
43
+ new(
44
+ self_: self_,
45
+ parent: parent,
46
+ additional_properties: struct
47
+ )
48
+ end
49
+
50
+ # Serialize an instance of AutomationsUpdateResponseLinks to a JSON object
51
+ #
52
+ # @return [String]
53
+ def to_json(*_args)
54
+ @_field_set&.to_json
55
+ end
56
+
57
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
58
+ # hash and check each fields type against the current object's property
59
+ # definitions.
60
+ #
61
+ # @param obj [Object]
62
+ # @return [Void]
63
+ def self.validate_raw(obj:)
64
+ obj.self_&.is_a?(String) != false || raise("Passed value for field obj.self_ is not the expected type, validation failed.")
65
+ obj.parent&.is_a?(String) != false || raise("Passed value for field obj.parent is not the expected type, validation failed.")
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "automations_update_response_meta_type"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Ittybit
8
+ class Automations
9
+ class AutomationsUpdateResponseMeta
10
+ # @return [String]
11
+ attr_reader :request_id
12
+ # @return [String]
13
+ attr_reader :org_id
14
+ # @return [String]
15
+ attr_reader :project_id
16
+ # @return [String]
17
+ attr_reader :version
18
+ # @return [Ittybit::Automations::AutomationsUpdateResponseMetaType]
19
+ attr_reader :type
20
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
21
+ attr_reader :additional_properties
22
+ # @return [Object]
23
+ attr_reader :_field_set
24
+ protected :_field_set
25
+
26
+ OMIT = Object.new
27
+
28
+ # @param request_id [String]
29
+ # @param org_id [String]
30
+ # @param project_id [String]
31
+ # @param version [String]
32
+ # @param type [Ittybit::Automations::AutomationsUpdateResponseMetaType]
33
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
34
+ # @return [Ittybit::Automations::AutomationsUpdateResponseMeta]
35
+ def initialize(request_id: OMIT, org_id: OMIT, project_id: OMIT, version: OMIT, type: OMIT,
36
+ additional_properties: nil)
37
+ @request_id = request_id if request_id != OMIT
38
+ @org_id = org_id if org_id != OMIT
39
+ @project_id = project_id if project_id != OMIT
40
+ @version = version if version != OMIT
41
+ @type = type if type != OMIT
42
+ @additional_properties = additional_properties
43
+ @_field_set = {
44
+ "request_id": request_id,
45
+ "org_id": org_id,
46
+ "project_id": project_id,
47
+ "version": version,
48
+ "type": type
49
+ }.reject do |_k, v|
50
+ v == OMIT
51
+ end
52
+ end
53
+
54
+ # Deserialize a JSON object to an instance of AutomationsUpdateResponseMeta
55
+ #
56
+ # @param json_object [String]
57
+ # @return [Ittybit::Automations::AutomationsUpdateResponseMeta]
58
+ def self.from_json(json_object:)
59
+ struct = JSON.parse(json_object, object_class: OpenStruct)
60
+ parsed_json = JSON.parse(json_object)
61
+ request_id = parsed_json["request_id"]
62
+ org_id = parsed_json["org_id"]
63
+ project_id = parsed_json["project_id"]
64
+ version = parsed_json["version"]
65
+ type = parsed_json["type"]
66
+ new(
67
+ request_id: request_id,
68
+ org_id: org_id,
69
+ project_id: project_id,
70
+ version: version,
71
+ type: type,
72
+ additional_properties: struct
73
+ )
74
+ end
75
+
76
+ # Serialize an instance of AutomationsUpdateResponseMeta to a JSON object
77
+ #
78
+ # @return [String]
79
+ def to_json(*_args)
80
+ @_field_set&.to_json
81
+ end
82
+
83
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
84
+ # hash and check each fields type against the current object's property
85
+ # definitions.
86
+ #
87
+ # @param obj [Object]
88
+ # @return [Void]
89
+ def self.validate_raw(obj:)
90
+ obj.request_id&.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
91
+ obj.org_id&.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
92
+ obj.project_id&.is_a?(String) != false || raise("Passed value for field obj.project_id is not the expected type, validation failed.")
93
+ obj.version&.is_a?(String) != false || raise("Passed value for field obj.version is not the expected type, validation failed.")
94
+ obj.type&.is_a?(Ittybit::Automations::AutomationsUpdateResponseMetaType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class Automations
5
+ class AutomationsUpdateResponseMetaType
6
+ OBJECT = "object"
7
+ LIST = "list"
8
+ end
9
+ end
10
+ end
@@ -1,9 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../../requests"
4
- require_relative "../types/file_list_response"
5
- require_relative "../types/file_response"
6
- require_relative "../types/confirmation_response"
4
+ require_relative "types/files_list_response"
5
+ require_relative "types/files_create_response"
6
+ require_relative "types/files_get_response"
7
+ require_relative "types/files_delete_response"
8
+ require_relative "types/files_update_response"
7
9
  require "async"
8
10
 
9
11
  module Ittybit
@@ -22,18 +24,18 @@ module Ittybit
22
24
  # @param page [Integer]
23
25
  # @param limit [Integer]
24
26
  # @param request_options [Ittybit::RequestOptions]
25
- # @return [Ittybit::FileListResponse]
27
+ # @return [Ittybit::Files::FilesListResponse]
26
28
  # @example
27
29
  # api = Ittybit::Client.new(
28
30
  # base_url: "https://api.example.com",
29
31
  # environment: Ittybit::Environment::DEFAULT,
30
- # token: "YOUR_AUTH_TOKEN"
32
+ # api_key: "YOUR_AUTH_TOKEN"
31
33
  # )
32
34
  # api.files.list
33
35
  def list(page: nil, limit: nil, request_options: nil)
34
36
  response = @request_client.conn.get do |req|
35
37
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
36
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
38
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
37
39
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
38
40
  req.headers = {
39
41
  **(req.headers || {}),
@@ -46,7 +48,7 @@ module Ittybit
46
48
  end
47
49
  req.url "#{@request_client.get_url(request_options: request_options)}/files"
48
50
  end
49
- Ittybit::FileListResponse.from_json(json_object: response.body)
51
+ Ittybit::Files::FilesListResponse.from_json(json_object: response.body)
50
52
  end
51
53
 
52
54
  # Creates a new file from a publicly accessible or signed URL.
@@ -58,23 +60,23 @@ module Ittybit
58
60
  # @param ref [String]
59
61
  # @param metadata [Hash{String => Object}]
60
62
  # @param request_options [Ittybit::RequestOptions]
61
- # @return [Ittybit::FileResponse]
63
+ # @return [Ittybit::Files::FilesCreateResponse]
62
64
  # @example
63
65
  # api = Ittybit::Client.new(
64
66
  # base_url: "https://api.example.com",
65
67
  # environment: Ittybit::Environment::DEFAULT,
66
- # token: "YOUR_AUTH_TOKEN"
68
+ # api_key: "YOUR_AUTH_TOKEN"
67
69
  # )
68
70
  # api.files.create(
69
71
  # url: "https://ittyb.it/sample.mp4",
70
72
  # folder: "ittybit/samples",
71
73
  # filename: "video.mp4",
72
- # metadata: { "customKey2": "a different custom value" }
74
+ # metadata: { "customKey": "your custom value" }
73
75
  # )
74
76
  def create(url:, media_id: nil, folder: nil, filename: nil, ref: nil, metadata: nil, request_options: nil)
75
77
  response = @request_client.conn.post do |req|
76
78
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
77
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
79
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
78
80
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
79
81
  req.headers = {
80
82
  **(req.headers || {}),
@@ -95,25 +97,25 @@ module Ittybit
95
97
  }.compact
96
98
  req.url "#{@request_client.get_url(request_options: request_options)}/files"
97
99
  end
98
- Ittybit::FileResponse.from_json(json_object: response.body)
100
+ Ittybit::Files::FilesCreateResponse.from_json(json_object: response.body)
99
101
  end
100
102
 
101
103
  # Retrieve the file object for a file with the given ID.
102
104
  #
103
105
  # @param id [String]
104
106
  # @param request_options [Ittybit::RequestOptions]
105
- # @return [Ittybit::FileResponse]
107
+ # @return [Ittybit::Files::FilesGetResponse]
106
108
  # @example
107
109
  # api = Ittybit::Client.new(
108
110
  # base_url: "https://api.example.com",
109
111
  # environment: Ittybit::Environment::DEFAULT,
110
- # token: "YOUR_AUTH_TOKEN"
112
+ # api_key: "YOUR_AUTH_TOKEN"
111
113
  # )
112
114
  # api.files.get(id: "file_abcdefgh1234")
113
115
  def get(id:, request_options: nil)
114
116
  response = @request_client.conn.get do |req|
115
117
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
116
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
118
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
117
119
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
118
120
  req.headers = {
119
121
  **(req.headers || {}),
@@ -128,25 +130,25 @@ module Ittybit
128
130
  end
129
131
  req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
130
132
  end
131
- Ittybit::FileResponse.from_json(json_object: response.body)
133
+ Ittybit::Files::FilesGetResponse.from_json(json_object: response.body)
132
134
  end
133
135
 
134
136
  # Permanently removes a file from the system. This action cannot be undone.
135
137
  #
136
138
  # @param id [String]
137
139
  # @param request_options [Ittybit::RequestOptions]
138
- # @return [Ittybit::ConfirmationResponse]
140
+ # @return [Ittybit::Files::FilesDeleteResponse]
139
141
  # @example
140
142
  # api = Ittybit::Client.new(
141
143
  # base_url: "https://api.example.com",
142
144
  # environment: Ittybit::Environment::DEFAULT,
143
- # token: "YOUR_AUTH_TOKEN"
145
+ # api_key: "YOUR_AUTH_TOKEN"
144
146
  # )
145
147
  # api.files.delete(id: "file_abcdefgh1234")
146
148
  def delete(id:, request_options: nil)
147
149
  response = @request_client.conn.delete do |req|
148
150
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
149
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
151
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
150
152
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
151
153
  req.headers = {
152
154
  **(req.headers || {}),
@@ -161,7 +163,7 @@ module Ittybit
161
163
  end
162
164
  req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
163
165
  end
164
- Ittybit::ConfirmationResponse.from_json(json_object: response.body)
166
+ Ittybit::Files::FilesDeleteResponse.from_json(json_object: response.body)
165
167
  end
166
168
 
167
169
  # Update a file's `filename`, `folder`, `ref`, or `metadata`. Only the specified
@@ -173,12 +175,12 @@ module Ittybit
173
175
  # @param ref [String]
174
176
  # @param metadata [Hash{String => Object}]
175
177
  # @param request_options [Ittybit::RequestOptions]
176
- # @return [Ittybit::FileResponse]
178
+ # @return [Ittybit::Files::FilesUpdateResponse]
177
179
  # @example
178
180
  # api = Ittybit::Client.new(
179
181
  # base_url: "https://api.example.com",
180
182
  # environment: Ittybit::Environment::DEFAULT,
181
- # token: "YOUR_AUTH_TOKEN"
183
+ # api_key: "YOUR_AUTH_TOKEN"
182
184
  # )
183
185
  # api.files.update(
184
186
  # id: "file_abcdefgh1234",
@@ -189,7 +191,7 @@ module Ittybit
189
191
  def update(id:, folder: nil, filename: nil, ref: nil, metadata: nil, request_options: nil)
190
192
  response = @request_client.conn.patch do |req|
191
193
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
192
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
194
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
193
195
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
194
196
  req.headers = {
195
197
  **(req.headers || {}),
@@ -208,7 +210,7 @@ module Ittybit
208
210
  }.compact
209
211
  req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
210
212
  end
211
- Ittybit::FileResponse.from_json(json_object: response.body)
213
+ Ittybit::Files::FilesUpdateResponse.from_json(json_object: response.body)
212
214
  end
213
215
  end
214
216
 
@@ -227,19 +229,19 @@ module Ittybit
227
229
  # @param page [Integer]
228
230
  # @param limit [Integer]
229
231
  # @param request_options [Ittybit::RequestOptions]
230
- # @return [Ittybit::FileListResponse]
232
+ # @return [Ittybit::Files::FilesListResponse]
231
233
  # @example
232
234
  # api = Ittybit::Client.new(
233
235
  # base_url: "https://api.example.com",
234
236
  # environment: Ittybit::Environment::DEFAULT,
235
- # token: "YOUR_AUTH_TOKEN"
237
+ # api_key: "YOUR_AUTH_TOKEN"
236
238
  # )
237
239
  # api.files.list
238
240
  def list(page: nil, limit: nil, request_options: nil)
239
241
  Async do
240
242
  response = @request_client.conn.get do |req|
241
243
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
242
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
244
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
243
245
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
244
246
  req.headers = {
245
247
  **(req.headers || {}),
@@ -252,7 +254,7 @@ module Ittybit
252
254
  end
253
255
  req.url "#{@request_client.get_url(request_options: request_options)}/files"
254
256
  end
255
- Ittybit::FileListResponse.from_json(json_object: response.body)
257
+ Ittybit::Files::FilesListResponse.from_json(json_object: response.body)
256
258
  end
257
259
  end
258
260
 
@@ -265,24 +267,24 @@ module Ittybit
265
267
  # @param ref [String]
266
268
  # @param metadata [Hash{String => Object}]
267
269
  # @param request_options [Ittybit::RequestOptions]
268
- # @return [Ittybit::FileResponse]
270
+ # @return [Ittybit::Files::FilesCreateResponse]
269
271
  # @example
270
272
  # api = Ittybit::Client.new(
271
273
  # base_url: "https://api.example.com",
272
274
  # environment: Ittybit::Environment::DEFAULT,
273
- # token: "YOUR_AUTH_TOKEN"
275
+ # api_key: "YOUR_AUTH_TOKEN"
274
276
  # )
275
277
  # api.files.create(
276
278
  # url: "https://ittyb.it/sample.mp4",
277
279
  # folder: "ittybit/samples",
278
280
  # filename: "video.mp4",
279
- # metadata: { "customKey2": "a different custom value" }
281
+ # metadata: { "customKey": "your custom value" }
280
282
  # )
281
283
  def create(url:, media_id: nil, folder: nil, filename: nil, ref: nil, metadata: nil, request_options: nil)
282
284
  Async do
283
285
  response = @request_client.conn.post do |req|
284
286
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
285
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
287
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
286
288
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
287
289
  req.headers = {
288
290
  **(req.headers || {}),
@@ -303,7 +305,7 @@ module Ittybit
303
305
  }.compact
304
306
  req.url "#{@request_client.get_url(request_options: request_options)}/files"
305
307
  end
306
- Ittybit::FileResponse.from_json(json_object: response.body)
308
+ Ittybit::Files::FilesCreateResponse.from_json(json_object: response.body)
307
309
  end
308
310
  end
309
311
 
@@ -311,19 +313,19 @@ module Ittybit
311
313
  #
312
314
  # @param id [String]
313
315
  # @param request_options [Ittybit::RequestOptions]
314
- # @return [Ittybit::FileResponse]
316
+ # @return [Ittybit::Files::FilesGetResponse]
315
317
  # @example
316
318
  # api = Ittybit::Client.new(
317
319
  # base_url: "https://api.example.com",
318
320
  # environment: Ittybit::Environment::DEFAULT,
319
- # token: "YOUR_AUTH_TOKEN"
321
+ # api_key: "YOUR_AUTH_TOKEN"
320
322
  # )
321
323
  # api.files.get(id: "file_abcdefgh1234")
322
324
  def get(id:, request_options: nil)
323
325
  Async do
324
326
  response = @request_client.conn.get do |req|
325
327
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
326
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
328
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
327
329
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
328
330
  req.headers = {
329
331
  **(req.headers || {}),
@@ -338,7 +340,7 @@ module Ittybit
338
340
  end
339
341
  req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
340
342
  end
341
- Ittybit::FileResponse.from_json(json_object: response.body)
343
+ Ittybit::Files::FilesGetResponse.from_json(json_object: response.body)
342
344
  end
343
345
  end
344
346
 
@@ -346,19 +348,19 @@ module Ittybit
346
348
  #
347
349
  # @param id [String]
348
350
  # @param request_options [Ittybit::RequestOptions]
349
- # @return [Ittybit::ConfirmationResponse]
351
+ # @return [Ittybit::Files::FilesDeleteResponse]
350
352
  # @example
351
353
  # api = Ittybit::Client.new(
352
354
  # base_url: "https://api.example.com",
353
355
  # environment: Ittybit::Environment::DEFAULT,
354
- # token: "YOUR_AUTH_TOKEN"
356
+ # api_key: "YOUR_AUTH_TOKEN"
355
357
  # )
356
358
  # api.files.delete(id: "file_abcdefgh1234")
357
359
  def delete(id:, request_options: nil)
358
360
  Async do
359
361
  response = @request_client.conn.delete do |req|
360
362
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
361
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
363
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
362
364
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
363
365
  req.headers = {
364
366
  **(req.headers || {}),
@@ -373,7 +375,7 @@ module Ittybit
373
375
  end
374
376
  req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
375
377
  end
376
- Ittybit::ConfirmationResponse.from_json(json_object: response.body)
378
+ Ittybit::Files::FilesDeleteResponse.from_json(json_object: response.body)
377
379
  end
378
380
  end
379
381
 
@@ -386,12 +388,12 @@ module Ittybit
386
388
  # @param ref [String]
387
389
  # @param metadata [Hash{String => Object}]
388
390
  # @param request_options [Ittybit::RequestOptions]
389
- # @return [Ittybit::FileResponse]
391
+ # @return [Ittybit::Files::FilesUpdateResponse]
390
392
  # @example
391
393
  # api = Ittybit::Client.new(
392
394
  # base_url: "https://api.example.com",
393
395
  # environment: Ittybit::Environment::DEFAULT,
394
- # token: "YOUR_AUTH_TOKEN"
396
+ # api_key: "YOUR_AUTH_TOKEN"
395
397
  # )
396
398
  # api.files.update(
397
399
  # id: "file_abcdefgh1234",
@@ -403,7 +405,7 @@ module Ittybit
403
405
  Async do
404
406
  response = @request_client.conn.patch do |req|
405
407
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
406
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
408
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
407
409
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
408
410
  req.headers = {
409
411
  **(req.headers || {}),
@@ -422,7 +424,7 @@ module Ittybit
422
424
  }.compact
423
425
  req.url "#{@request_client.get_url(request_options: request_options)}/files/#{id}"
424
426
  end
425
- Ittybit::FileResponse.from_json(json_object: response.body)
427
+ Ittybit::Files::FilesUpdateResponse.from_json(json_object: response.body)
426
428
  end
427
429
  end
428
430
  end